Update to 0.3.0 (New upstream + new RPC calls)
[novacoin.git] / src / pbkdf2.h
1 // Copyright (c) 2013 NovaCoin Developers
2
3 #ifndef PBKDF2_H
4 #define PBKDF2_H
5
6 #include <openssl/sha.h>
7 #include <stdint.h>
8
9 typedef struct HMAC_SHA256Context {
10     SHA256_CTX ictx;
11     SHA256_CTX octx;
12 } HMAC_SHA256_CTX;
13
14 void
15 HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen);
16
17 void
18 HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void *in, size_t len);
19
20 void
21 HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX * ctx);
22
23 void
24 PBKDF2_SHA256(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt,
25     size_t saltlen, uint64_t c, uint8_t * buf, size_t dkLen);
26
27 #endif // PBKDF2_H