projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clarify (non-)blocking behavior of EGD socket interface used by RAND_egd().
[oweals/openssl.git]
/
doc
/
crypto
/
EVP_EncryptInit.pod
diff --git
a/doc/crypto/EVP_EncryptInit.pod
b/doc/crypto/EVP_EncryptInit.pod
index 228e1f9e7e3f990079d96f903f984109a0e6e507..8271d3dfc417a2126f9fc193e545b112e19c05ff 100644
(file)
--- 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 <openssl/evp.h>
#include <openssl/evp.h>
-
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);
int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
ENGINE *impl, unsigned char *key, unsigned char *iv);
@@
-236,14
+236,14
@@
RC5 can be set.
=head1 RETURN VALUES
=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.
EVP_CipherInit_ex() and EVP_CipherUpdate() 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.
EVP_CipherInit_ex() and EVP_CipherUpdate() return 1 for success and 0 for failure.
-EVP_CipherFinal_ex() returns
1
for a decryption failure or 1 for success.
+EVP_CipherFinal_ex() returns
0
for a decryption failure or 1 for success.
EVP_CIPHER_CTX_cleanup() returns 1 for success and 0 for failure.
EVP_CIPHER_CTX_cleanup() returns 1 for success and 0 for failure.
@@
-419,7
+419,7
@@
Encrypt a string using blowfish:
EVP_CIPHER_CTX ctx;
FILE *out;
EVP_CIPHER_CTX_init(&ctx);
EVP_CIPHER_CTX ctx;
FILE *out;
EVP_CIPHER_CTX_init(&ctx);
- EVP_EncryptInit_ex(&ctx,
NULL, EVP_bf_cbc()
, key, iv);
+ EVP_EncryptInit_ex(&ctx,
EVP_bf_cbc(), NULL
, key, iv);
if(!EVP_EncryptUpdate(&ctx, outbuf, &outlen, intext, strlen(intext)))
{
if(!EVP_EncryptUpdate(&ctx, outbuf, &outlen, intext, strlen(intext)))
{
@@
-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 */
if(!EVP_CipherUpdate(&ctx, outbuf, &outlen, inbuf, inlen))
{
/* Error */
+ EVP_CIPHER_CTX_cleanup(&ctx);
return 0;
}
fwrite(outbuf, 1, outlen, out);
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 */
if(!EVP_CipherFinal_ex(&ctx, outbuf, &outlen))
{
/* Error */
+ EVP_CIPHER_CTX_cleanup(&ctx);
return 0;
}
fwrite(outbuf, 1, outlen, out);
return 0;
}
fwrite(outbuf, 1, outlen, out);
@@
-501,4
+503,9
@@
L<evp(3)|evp(3)>
=head1 HISTORY
=head1 HISTORY
+EVP_CIPHER_CTX_init(), EVP_EncryptInit_ex(), EVP_EncryptFinal_ex(),
+EVP_DecryptInit_ex(), EVP_DecryptFinal_ex(), EVP_CipherInit_ex(),
+EVP_CipherFinal_ex() and EVP_CIPHER_CTX_set_padding() appeared in
+OpenSSL 0.9.7.
+
=cut
=cut