aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-08-17 18:21:46 -0400
committerJack Lloyd <[email protected]>2019-08-19 09:50:18 -0400
commit26554240bead691e958ada9751bb523ecbedfb24 (patch)
tree964419e3103fd641fd7372d3ef856ef2add38ab6 /src/lib/ffi
parentd5ebaadb7cca8898564cbe097e706e9d79cd97ac (diff)
Deprecate some more redundant ffi functions
Diffstat (limited to 'src/lib/ffi')
-rw-r--r--src/lib/ffi/ffi.h41
1 files changed, 31 insertions, 10 deletions
diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h
index 980d8f906..f140f617a 100644
--- a/src/lib/ffi/ffi.h
+++ b/src/lib/ffi/ffi.h
@@ -538,12 +538,18 @@ BOTAN_PUBLIC_API(2,0) int botan_cipher_destroy(botan_cipher_t cipher);
* @param salt_len length of salt in bytes
* @param iterations the number of iterations to use (use 10K or more)
* @return 0 on success, a negative value on failure
+*
+* Deprecated: use
+* botan_pwdhash(pbkdf_algo, iterations, 0, 0, out, out_len,
+* passphrase, 0, salt, salt_len);
*/
-BOTAN_PUBLIC_API(2,0) int botan_pbkdf(const char* pbkdf_algo,
- uint8_t out[], size_t out_len,
- const char* passphrase,
- const uint8_t salt[], size_t salt_len,
- size_t iterations);
+BOTAN_PUBLIC_API(2,0) int
+BOTAN_DEPRECATED("Use botan_pwdhash")
+botan_pbkdf(const char* pbkdf_algo,
+ uint8_t out[], size_t out_len,
+ const char* passphrase,
+ const uint8_t salt[], size_t salt_len,
+ size_t iterations);
/**
* Derive a key from a passphrase, running until msec time has elapsed.
@@ -557,6 +563,17 @@ BOTAN_PUBLIC_API(2,0) int botan_pbkdf(const char* pbkdf_algo,
* run until milliseconds_to_run milliseconds has passed
* @param out_iterations_used set to the number iterations executed
* @return 0 on success, a negative value on failure
+*
+* Deprecated: use
+*
+* botan_pwdhash_timed(pbkdf_algo,
+* static_cast<uint32_t>(ms_to_run),
+* iterations_used,
+* nullptr,
+* nullptr,
+* out, out_len,
+* password, 0,
+* salt, salt_len);
*/
BOTAN_PUBLIC_API(2,0) int botan_pbkdf_timed(const char* pbkdf_algo,
uint8_t out[], size_t out_len,
@@ -624,11 +641,15 @@ int BOTAN_PUBLIC_API(2,8) botan_pwdhash_timed(
/**
* Derive a key using scrypt
-*/
-BOTAN_PUBLIC_API(2,8) int botan_scrypt(uint8_t out[], size_t out_len,
- const char* passphrase,
- const uint8_t salt[], size_t salt_len,
- size_t N, size_t r, size_t p);
+* Deprecated; use
+* botan_pwdhash("Scrypt", N, r, p, out, out_len, password, 0, salt, salt_len);
+*/
+BOTAN_PUBLIC_API(2,8) int
+BOTAN_DEPRECATED("Use botan_pwdhash")
+botan_scrypt(uint8_t out[], size_t out_len,
+ const char* passphrase,
+ const uint8_t salt[], size_t salt_len,
+ size_t N, size_t r, size_t p);
/**
* Derive a key