summaryrefslogtreecommitdiffstats
path: root/src/util/crypto/sss_crypto.h
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2012-04-17 11:03:23 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-04-24 09:50:56 -0400
commitb35f20cd8ecdc8308a3201e55752fb0443ec6ae4 (patch)
tree86e2dd8a431652fcf00e2e7513371d02db2ea6e9 /src/util/crypto/sss_crypto.h
parent84c5d214242c3846a1b4c8f80e1935e77fe1c5c7 (diff)
downloadsssd-b35f20cd8ecdc8308a3201e55752fb0443ec6ae4.tar.gz
sssd-b35f20cd8ecdc8308a3201e55752fb0443ec6ae4.tar.xz
sssd-b35f20cd8ecdc8308a3201e55752fb0443ec6ae4.zip
UTIL: Add HMAC-SHA-1 function
Diffstat (limited to 'src/util/crypto/sss_crypto.h')
-rw-r--r--src/util/crypto/sss_crypto.h8
1 files changed, 8 insertions, 0 deletions
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);