diff options
author | Jack Lloyd <[email protected]> | 2018-08-11 15:31:24 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-08-11 15:31:24 -0400 |
commit | 772830b496b47be647d7b3297caf67557c7867c8 (patch) | |
tree | eb22b5e859f5042e07c6030702814369ab59c25d /src/lib/ffi | |
parent | 2c10ec625d799d513a56ec93f8117999143be244 (diff) |
Put bcrypt decls in ffi in same place
Diffstat (limited to 'src/lib/ffi')
-rw-r--r-- | src/lib/ffi/ffi.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h index 080c71cef..30bbae018 100644 --- a/src/lib/ffi/ffi.h +++ b/src/lib/ffi/ffi.h @@ -532,25 +532,6 @@ BOTAN_PUBLIC_API(2,0) int botan_kdf(const char* kdf_algo, const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len); -/** -* Create a password hash using Bcrypt -* @param out buffer holding the password hash, should be of length 64 bytes -* @param out_len the desired output length in bytes -* @param password the password -* @param rng a random number generator -* @param work_factor how much work to do to slow down guessing attacks -* @param flags should be 0 in current API revision, all other uses are reserved -* and return BOTAN_FFI_ERROR_BAD_FLAG -* @return 0 on success, a negative value on failure - -* Output is formatted bcrypt $2a$... -*/ -BOTAN_PUBLIC_API(2,0) int botan_bcrypt_generate(uint8_t* out, size_t* out_len, - const char* password, - botan_rng_t rng, - size_t work_factor, - uint32_t flags); - /* * Raw Block Cipher (PRP) interface */ @@ -736,6 +717,25 @@ BOTAN_PUBLIC_API(2,1) int botan_mp_clear_bit(botan_mp_t n, size_t bit); /* Bcrypt password hashing */ /** +* Create a password hash using Bcrypt +* @param out buffer holding the password hash, should be of length 64 bytes +* @param out_len the desired output length in bytes +* @param password the password +* @param rng a random number generator +* @param work_factor how much work to do to slow down guessing attacks +* @param flags should be 0 in current API revision, all other uses are reserved +* and return BOTAN_FFI_ERROR_BAD_FLAG +* @return 0 on success, a negative value on failure + +* Output is formatted bcrypt $2a$... +*/ +BOTAN_PUBLIC_API(2,0) int botan_bcrypt_generate(uint8_t* out, size_t* out_len, + const char* password, + botan_rng_t rng, + size_t work_factor, + uint32_t flags); + +/** * Check a previously created password hash * @param pass the password to check against * @param hash the stored hash to check against @@ -751,9 +751,9 @@ BOTAN_PUBLIC_API(2,0) int botan_bcrypt_is_valid(const char* pass, const char* ha typedef struct botan_privkey_struct* botan_privkey_t; BOTAN_PUBLIC_API(2,0) int botan_privkey_create(botan_privkey_t* key, - const char* algo_name, - const char* algo_params, - botan_rng_t rng); + const char* algo_name, + const char* algo_params, + botan_rng_t rng); #define BOTAN_CHECK_KEY_EXPENSIVE_TESTS 1 |