Skip to content
Snippets Groups Projects
Commit ad41d7e5 authored by Donald Stufft's avatar Donald Stufft
Browse files

Start nacl.ffi.libsodium with the low level hashing functions

parent 753617bb
No related branches found
No related tags found
No related merge requests found
"""
CFFI interface to libsodium the library
"""
from cffi import FFI
ffi = FFI()
ffi.cdef(
# Low Level Hashing functions
"""
static const int crypto_hash_BYTES;
static const int crypto_hash_sha256_BYTES;
static const int crypto_hash_sha512_BYTES;
int crypto_hash(unsigned char *out, const unsigned char *in, unsigned long long inlen);
int crypto_hash_sha256(unsigned char *out, const unsigned char *in, unsigned long long inlen);
int crypto_hash_sha512(unsigned char *out, const unsigned char *in, unsigned long long inlen);
"""
)
lib = ffi.verify("#include <sodium.h>", libraries=["sodium"])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment