Displaying 1 result from an estimated 1 matches for "get_mdfour".
2020 Feb 09
2
[RFC PATCH] Add SHA1 support
...@@ -2,7 +2,8 @@
#define MD4_DIGEST_LEN 16
#define MD5_DIGEST_LEN 16
-#define MAX_DIGEST_LEN MD5_DIGEST_LEN
+#define SHA1_DIGEST_LEN 20
+#define MAX_DIGEST_LEN SHA1_DIGEST_LEN
#define CSUM_CHUNK 64
@@ -19,8 +20,80 @@ void mdfour_result(md_context *md, uchar digest[MD4_DIGEST_LEN]);
void get_mdfour(uchar digest[MD4_DIGEST_LEN], const uchar *in, int length);
+#ifdef HAVE_OPENSSL
+#include <openssl/crypto.h>
+#include <openssl/evp.h>
+
+#define MDLIB_MD_CTX EVP_MD_CTX
+
+#define mdlib_initialize() OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL);
+
+#define mdlib_new_ctx...