From 05ff55714a7ee3214288c68f136360d015659a5a Mon Sep 17 00:00:00 2001 From: Jakob Cornell Date: Fri, 5 Nov 2021 23:17:05 -0500 Subject: [PATCH] Fix nettle symbol names --- src/disk_jumble/nettle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.30.2