summaryrefslogtreecommitdiff
path: root/source4/lib/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/crypto')
-rw-r--r--source4/lib/crypto/hmacmd5.c10
-rw-r--r--source4/lib/crypto/md4.c6
2 files changed, 9 insertions, 7 deletions
diff --git a/source4/lib/crypto/hmacmd5.c b/source4/lib/crypto/hmacmd5.c
index 2045f9a9d7..7635bf6a82 100644
--- a/source4/lib/crypto/hmacmd5.c
+++ b/source4/lib/crypto/hmacmd5.c
@@ -29,7 +29,7 @@
/***********************************************************************
the rfc 2104 version of hmac_md5 initialisation.
***********************************************************************/
-void hmac_md5_init_rfc2104(const uint8_t *key, int key_len, HMACMD5Context *ctx)
+_PUBLIC_ void hmac_md5_init_rfc2104(const uint8_t *key, int key_len, HMACMD5Context *ctx)
{
int i;
@@ -67,7 +67,7 @@ void hmac_md5_init_rfc2104(const uint8_t *key, int key_len, HMACMD5Context *ctx)
/***********************************************************************
the microsoft version of hmac_md5 initialisation.
***********************************************************************/
-void hmac_md5_init_limK_to_64(const uint8_t *key, int key_len,
+_PUBLIC_ void hmac_md5_init_limK_to_64(const uint8_t *key, int key_len,
HMACMD5Context *ctx)
{
/* if key is longer than 64 bytes truncate it */
@@ -82,7 +82,7 @@ void hmac_md5_init_limK_to_64(const uint8_t *key, int key_len,
/***********************************************************************
update hmac_md5 "inner" buffer
***********************************************************************/
-void hmac_md5_update(const uint8_t *text, int text_len, HMACMD5Context *ctx)
+_PUBLIC_ void hmac_md5_update(const uint8_t *text, int text_len, HMACMD5Context *ctx)
{
MD5Update(&ctx->ctx, text, text_len); /* then text of datagram */
}
@@ -90,7 +90,7 @@ void hmac_md5_update(const uint8_t *text, int text_len, HMACMD5Context *ctx)
/***********************************************************************
finish off hmac_md5 "inner" buffer and generate outer one.
***********************************************************************/
-void hmac_md5_final(uint8_t *digest, HMACMD5Context *ctx)
+_PUBLIC_ void hmac_md5_final(uint8_t *digest, HMACMD5Context *ctx)
{
struct MD5Context ctx_o;
@@ -106,7 +106,7 @@ void hmac_md5_final(uint8_t *digest, HMACMD5Context *ctx)
single function to calculate an HMAC MD5 digest from data.
use the microsoft hmacmd5 init method because the key is 16 bytes.
************************************************************/
-void hmac_md5(const uint8_t key[16], const uint8_t *data, int data_len, uint8_t *digest)
+_PUBLIC_ void hmac_md5(const uint8_t key[16], const uint8_t *data, int data_len, uint8_t *digest)
{
HMACMD5Context ctx;
hmac_md5_init_limK_to_64(key, 16, &ctx);
diff --git a/source4/lib/crypto/md4.c b/source4/lib/crypto/md4.c
index 98fcabf224..5b57c57dbb 100644
--- a/source4/lib/crypto/md4.c
+++ b/source4/lib/crypto/md4.c
@@ -124,8 +124,10 @@ static void copy4(uint8_t *out, uint32_t x)
out[3] = (x>>24)&0xFF;
}
-/* produce a md4 message digest from data of length n bytes */
-void mdfour(uint8_t *out, const uint8_t *in, int n)
+/**
+ * produce a md4 message digest from data of length n bytes
+ */
+_PUBLIC_ void mdfour(uint8_t *out, const uint8_t *in, int n)
{
uint8_t buf[128];
uint32_t M[16];