From: Jakob Cornell Date: Sat, 6 Nov 2021 04:17:05 +0000 (-0500) Subject: Fix nettle symbol names X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=05ff55714a7ee3214288c68f136360d015659a5a;p=eros.git Fix nettle symbol names --- diff --git a/src/disk_jumble/nettle.py b/src/disk_jumble/nettle.py index d211aba..c432d1f 100644 --- a/src/disk_jumble/nettle.py +++ b/src/disk_jumble/nettle.py @@ -47,7 +47,7 @@ class Sha1Hasher(_Sha1Defs): @classmethod def _new_context(cls): ctx = cls.Context() - _LIB.sha1_init(ctypes.byref(ctx)) + _LIB.nettle_sha1_init(ctypes.byref(ctx)) return ctx def __init__(self, ctx_dict: Optional[dict]): @@ -57,10 +57,10 @@ class Sha1Hasher(_Sha1Defs): self.ctx = self._new_context() def update(self, data): - _LIB.sha1_update(ctypes.byref(self.ctx), len(data), data) + _LIB.nettle_sha1_update(ctypes.byref(self.ctx), len(data), data) def digest(self): """Return the current digest and reset the hasher state.""" out = (ctypes.c_uint8 * self._DIGEST_SIZE)() - _LIB.sha1_digest(ctypes.byref(self.ctx), self._DIGEST_SIZE, out) + _LIB.nettle_sha1_digest(ctypes.byref(self.ctx), self._DIGEST_SIZE, out) return bytes(out)