summaryrefslogtreecommitdiff
path: root/source4/lib/crypto
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-05 17:44:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:15 -0500
commitc71c86c52458eefae8a34774ec186c2837f473af (patch)
treecaeda5cdb47d5f6fefb4eabb50e66187823e5ac4 /source4/lib/crypto
parentaf30a32b6924b0f2b701186e435defbca2ebd1aa (diff)
downloadsamba-c71c86c52458eefae8a34774ec186c2837f473af.tar.gz
samba-c71c86c52458eefae8a34774ec186c2837f473af.tar.bz2
samba-c71c86c52458eefae8a34774ec186c2837f473af.zip
r13842: Make some more functions public.
(This used to be commit aac1b99b362993352d80692afa55c38fc851c016)
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];