提交 83f68df3 编写于 作者: C Conrado Porto Lopes Gouvêa 提交者: Rich Salz

Update EVP_CIPHER_CTX_set_padding documentation.

Add note about when EVP_CIPHER_CTX_set_padding should be called.
Reviewed-by: NDr. Stephen Henson <steve@openssl.org>
上级 f33d63c9
...@@ -194,12 +194,14 @@ passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX> structure. The actual NID ...@@ -194,12 +194,14 @@ passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX> structure. The actual NID
value is an internal value which may not have a corresponding OBJECT value is an internal value which may not have a corresponding OBJECT
IDENTIFIER. IDENTIFIER.
EVP_CIPHER_CTX_set_padding() enables or disables padding. By default EVP_CIPHER_CTX_set_padding() enables or disables padding. This
encryption operations are padded using standard block padding and the function should be called after the context is set up for encryption
padding is checked and removed when decrypting. If the B<pad> parameter or decryption with EVP_EncryptInit_ex(), EVP_DecryptInit_ex() or
is zero then no padding is performed, the total amount of data encrypted EVP_CipherInit_ex(). By default encryption operations are padded using
or decrypted must then be a multiple of the block size or an error will standard block padding and the padding is checked and removed when
occur. decrypting. If the B<pad> 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 EVP_CIPHER_key_length() and EVP_CIPHER_CTX_key_length() return the key
length of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX> length of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册