X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=doc%2Fcrypto%2FEVP_EncryptInit.pod;h=8271d3dfc417a2126f9fc193e545b112e19c05ff;hp=daf57e5895f1cdb4ed3e0dc15798f697ac995095;hb=e05d6c7d3c53d42b0595c8ecfbe4f67398df60f7;hpb=284b216b3a8afe6cf788190d524ca3f156672fe1 diff --git a/doc/crypto/EVP_EncryptInit.pod b/doc/crypto/EVP_EncryptInit.pod index daf57e5895..8271d3dfc4 100644 --- a/doc/crypto/EVP_EncryptInit.pod +++ b/doc/crypto/EVP_EncryptInit.pod @@ -22,7 +22,7 @@ EVP_CIPHER_CTX_set_padding - EVP cipher routines #include - int EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); + void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, ENGINE *impl, unsigned char *key, unsigned char *iv); @@ -236,8 +236,8 @@ RC5 can be set. =head1 RETURN VALUES -EVP_CIPHER_CTX_init, EVP_EncryptInit_ex(), EVP_EncryptUpdate() and -EVP_EncryptFinal_ex() return 1 for success and 0 for failure. +EVP_EncryptInit_ex(), EVP_EncryptUpdate() and EVP_EncryptFinal_ex() +return 1 for success and 0 for failure. EVP_DecryptInit_ex() and EVP_DecryptUpdate() return 1 for success and 0 for failure. EVP_DecryptFinal_ex() returns 0 if the decrypt failed or 1 for success. @@ -479,6 +479,7 @@ General encryption, decryption function example using FILE I/O and RC2 with an if(!EVP_CipherUpdate(&ctx, outbuf, &outlen, inbuf, inlen)) { /* Error */ + EVP_CIPHER_CTX_cleanup(&ctx); return 0; } fwrite(outbuf, 1, outlen, out); @@ -486,6 +487,7 @@ General encryption, decryption function example using FILE I/O and RC2 with an if(!EVP_CipherFinal_ex(&ctx, outbuf, &outlen)) { /* Error */ + EVP_CIPHER_CTX_cleanup(&ctx); return 0; } fwrite(outbuf, 1, outlen, out);