From 83f68df32f0067ee7b092f70568fc33e526fd4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Conrado=20Porto=20Lopes=20Gouv=C3=AAa?= Date: Tue, 15 Mar 2016 13:32:38 -0300 Subject: Update EVP_CIPHER_CTX_set_padding documentation. Add note about when EVP_CIPHER_CTX_set_padding should be called. Reviewed-by: Dr. Stephen Henson --- doc/crypto/EVP_EncryptInit.pod | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/crypto/EVP_EncryptInit.pod b/doc/crypto/EVP_EncryptInit.pod index f064d672a7..1b39e83961 100644 --- a/doc/crypto/EVP_EncryptInit.pod +++ b/doc/crypto/EVP_EncryptInit.pod @@ -194,12 +194,14 @@ passed an B or B structure. The actual NID value is an internal value which may not have a corresponding OBJECT IDENTIFIER. -EVP_CIPHER_CTX_set_padding() enables or disables padding. By default -encryption operations are padded using standard block padding and the -padding is checked and removed when decrypting. If the B parameter -is zero then no padding is performed, the total amount of data encrypted -or decrypted must then be a multiple of the block size or an error will -occur. +EVP_CIPHER_CTX_set_padding() enables or disables padding. This +function should be called after the context is set up for encryption +or decryption with EVP_EncryptInit_ex(), EVP_DecryptInit_ex() or +EVP_CipherInit_ex(). By default encryption operations are padded using +standard block padding and the padding is checked and removed when +decrypting. If the B parameter is zero then no padding is +performed, the total amount of data encrypted or decrypted must then +be a multiple of the block size or an error will occur. EVP_CIPHER_key_length() and EVP_CIPHER_CTX_key_length() return the key length of a cipher when passed an B or B -- cgit v1.2.3