Fix nettle symbol names
authorJakob Cornell <jakob+gpg@jcornell.net>
Sat, 6 Nov 2021 04:17:05 +0000 (23:17 -0500)
committerJakob Cornell <jakob+gpg@jcornell.net>
Sat, 6 Nov 2021 04:17:05 +0000 (23:17 -0500)
src/disk_jumble/nettle.py

index d211abafc583840e0647aaba253e41aa81c87ffa..c432d1fcc08ef83f5175b520dc6ff2ed21fcb8d6 100644 (file)
@@ -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)