diff options
author | Pauli <pauli@openssl.org> | 2022-01-07 01:47:02 +0100 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2022-01-19 11:50:22 +0100 |
commit | 0324ae3e98725f722b7d7871c23fbbff596a5bf6 (patch) | |
tree | 8f80a1eb42d8501562e25de03a1abe4f2f6f8883 /doc/man3/EVP_EncryptInit.pod | |
parent | Add context dup functions for digests and ciphers (diff) | |
download | openssl-0324ae3e98725f722b7d7871c23fbbff596a5bf6.tar.xz openssl-0324ae3e98725f722b7d7871c23fbbff596a5bf6.zip |
doc: document digest and cipher dup functions
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17529)
Diffstat (limited to '')
-rw-r--r-- | doc/man3/EVP_EncryptInit.pod | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod index fcaa5d669d..b220e6e0b8 100644 --- a/doc/man3/EVP_EncryptInit.pod +++ b/doc/man3/EVP_EncryptInit.pod @@ -8,6 +8,8 @@ EVP_CIPHER_free, EVP_CIPHER_CTX_new, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX_free, +EVP_CIPHER_CTX_dup, +EVP_CIPHER_CTX_copy, EVP_EncryptInit_ex, EVP_EncryptInit_ex2, EVP_EncryptUpdate, @@ -109,6 +111,8 @@ EVP_CIPHER_CTX_mode EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx); void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx); + EVP_CIPHER_CTX *EVP_CIPHER_CTX_dup(const EVP_CIPHER_CTX *in); + int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, ENGINE *impl, const unsigned char *key, const unsigned char *iv); @@ -280,6 +284,16 @@ associated with it, including I<ctx> itself. This function should be called afte all operations using a cipher are complete so sensitive information does not remain in memory. +=item EVP_CIPHER_CTX_dup() + +Can be used to duplicate the cipher state from I<in>. This is useful +to avoid multiple EVP_MD_fetch() calls or if large amounts of data are to be +hashed which only differ in the last few bytes. + +=item EVP_CIPHER_CTX_copy() + +Can be used to copy the cipher state from I<in> to I<out>. + =item EVP_CIPHER_CTX_ctrl() I<This is a legacy method.> EVP_CIPHER_CTX_set_params() and @@ -1186,6 +1200,10 @@ EVP_CIPHER_up_ref() returns 1 for success or 0 otherwise. EVP_CIPHER_CTX_new() returns a pointer to a newly created B<EVP_CIPHER_CTX> for success and B<NULL> for failure. +EVP_CIPHER_CTX_dup() returns a new EVP_MD_CTX if successful or NULL on failure. + +EVP_CIPHER_CTX_copy() returns 1 if successful or 0 for failure. + EVP_EncryptInit_ex2(), EVP_EncryptUpdate() and EVP_EncryptFinal_ex() return 1 for success and 0 for failure. @@ -1699,6 +1717,8 @@ non-deprecated alias macro. The EVP_CIPHER_CTX_flags() macro was deprecated in OpenSSL 1.1.0. +EVP_CIPHER_CTX_dup() was added in OpenSSL 3.1. + =head1 COPYRIGHT Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. |