aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-03-29 10:10:55 -0400
committerJack Lloyd <[email protected]>2017-03-29 10:10:55 -0400
commite77f301e65901e2f3bb0e6414bfd9632f6cdda63 (patch)
tree8fd08e10f38208767b5a1d409d7c935f73196acf /doc
parent8a312886fc3b6286b0bee67ad806ff9047256903 (diff)
Document functions added in GH #899
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/ffi.rst30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/manual/ffi.rst b/doc/manual/ffi.rst
index 2be13e575..d53bdb977 100644
--- a/doc/manual/ffi.rst
+++ b/doc/manual/ffi.rst
@@ -429,6 +429,36 @@ Public Key Creation, Import and Export
const char* encryption_algo, \
uint32_t flags)
+ Deprecated, use ``botan_privkey_export_encrypted_msec`` or ``botan_privkey_export_encrypted_iter``
+
+.. cpp::function:: int botan_privkey_export_encrypted_pbkdf_msec(botan_privkey_t key,
+ uint8_t out[], size_t* out_len, \
+ botan_rng_t rng, \
+ const char* passphrase, \
+ uint32_t pbkdf_msec_runtime, \
+ size_t* pbkdf_iterations_out, \
+ const char* cipher_algo, \
+ const char* pbkdf_algo, \
+ uint32_t flags);
+
+ Encrypt a key, running the key derivation function for ``pbkdf_msec_runtime`` milliseconds.
+ Returns the number of iterations used in ``pbkdf_iterations_out``.
+
+ ``cipher_algo`` must specify a CBC mode cipher (such as "AES-128/CBC") or as
+ a Botan-specific extension a GCM mode may be used.
+
+.. cpp::function:: int botan_privkey_export_encrypted_pbkdf_iter(botan_privkey_t key, \
+ uint8_t out[], size_t* out_len, \
+ botan_rng_t rng, \
+ const char* passphrase, \
+ size_t pbkdf_iterations, \
+ const char* cipher_algo, \
+ const char* pbkdf_algo, \
+ uint32_t flags);
+
+ Encrypt a private key. The PBKDF function runs for the specified number of iterations.
+ At least 100,000 is recommended.
+
.. cpp:type:: opaque* botan_pubkey_t
An opaque data type for a public key. Don't mess with it.