diff options
author | Damien Miller <djm@mindrot.org> | 2013-07-29 14:52:31 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-07-29 14:52:31 +1000 |
commit | 0da6e570ab13a527ca06f688c59737ed9eae1de2 (patch) | |
tree | 41e703e9b304890d3b517cd48d1eada2e4857a1b /bcrypt/pybc_blf.h | |
parent | bae2b6181523d39d9313f9b996199e618684ed63 (diff) | |
parent | ae4091e2bf9f1e9bebe2f22da949502e8defebfe (diff) | |
download | py-bcrypt-0da6e570ab13a527ca06f688c59737ed9eae1de2.tar.gz |
merge
Diffstat (limited to 'bcrypt/pybc_blf.h')
-rw-r--r-- | bcrypt/pybc_blf.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bcrypt/pybc_blf.h b/bcrypt/pybc_blf.h index 5f9ecd7..68b404f 100644 --- a/bcrypt/pybc_blf.h +++ b/bcrypt/pybc_blf.h @@ -34,11 +34,13 @@ #ifndef _PYBC_BLF_H_ #define _PYBC_BLF_H_ +#include <sys/types.h> #if __STDC_VERSION__ >= 199901L /* C99 or later */ #include <stdint.h> typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; +typedef uint64_t u_int64_t; #elif defined(_WIN32) typedef unsigned __int8 u_int8_t; typedef unsigned __int16 u_int16_t; @@ -79,4 +81,12 @@ void pybc_blf_enc(pybc_blf_ctx *, u_int32_t *, u_int16_t); /* Converts u_int8_t to u_int32_t */ u_int32_t pybc_Blowfish_stream2word(const u_int8_t *, u_int16_t, u_int16_t *); +/* KDF interface */ +int bcrypt_pbkdf(const char *pass, size_t passlen, + const u_int8_t *salt, size_t saltlen, + u_int8_t *key, size_t keylen, unsigned int rounds); + +/* timingsafe_bcmp */ +int pybc_timingsafe_bcmp(const void *b1, const void *b2, size_t n); + #endif |