diff -r ac5ac55b1b2e -r da2b0cc44e4f libidav/crypto.h --- a/libidav/crypto.h Tue Mar 12 09:35:04 2019 +0100 +++ b/libidav/crypto.h Wed Mar 13 12:52:24 2019 +0100 @@ -97,6 +97,8 @@ int end; } AESEncrypter; +typedef struct DavHashContext DavHashContext; + int dav_rand_bytes(unsigned char *buf, size_t len); AESDecrypter* aes_decrypter_new(DavKey *key, void *stream, dav_write_func write_func); @@ -116,6 +118,10 @@ char* dav_create_hash(const char *data, size_t len); +DAV_SHA_CTX* dav_hash_init(void); +void dav_hash_update(DAV_SHA_CTX *ctx, const char *data, size_t len); +void dav_hash_final(DAV_SHA_CTX *ctx, unsigned char *buf); + DavKey* dav_pw2key(const char *password, const unsigned char *salt, int saltlen, int pwfunc, int enc); UcxBuffer* aes_encrypt_buffer(UcxBuffer *buf, DavKey *key);