From b35f20cd8ecdc8308a3201e55752fb0443ec6ae4 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Tue, 17 Apr 2012 11:03:23 -0400 Subject: UTIL: Add HMAC-SHA-1 function --- src/util/crypto/sss_crypto.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/util/crypto/sss_crypto.h') diff --git a/src/util/crypto/sss_crypto.h b/src/util/crypto/sss_crypto.h index 7b3e5e09c..5b40ecfc4 100644 --- a/src/util/crypto/sss_crypto.h +++ b/src/util/crypto/sss_crypto.h @@ -19,6 +19,14 @@ unsigned char *sss_base64_decode(TALLOC_CTX *mem_ctx, const char *in, size_t *outsize); +#define SSS_SHA1_LENGTH 20 + +int sss_hmac_sha1(const unsigned char *key, + size_t key_len, + const unsigned char *in, + size_t in_len, + unsigned char *out); + int sss_password_encrypt(TALLOC_CTX *mem_ctx, const char *password, int plen, enum obfmethod meth, char **obfpwd); -- cgit