diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2001-10-16 01:24:29 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2001-10-16 01:24:29 +0000 |
commit | 20d2186c87dabec56c6da48961a779843724a019 (patch) | |
tree | 4c5c2ba2e12a851c48726b6e5cc83a006f8291f1 /crypto/evp/evp_key.c | |
parent | 9ba3ec91766e559f96248fe10c77551a4e017ec3 (diff) |
Retain compatibility of EVP_DigestInit() and EVP_DigestFinal()
with existing code.
Modify library to use digest *_ex() functions.
Diffstat (limited to 'crypto/evp/evp_key.c')
-rw-r--r-- | crypto/evp/evp_key.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/evp/evp_key.c b/crypto/evp/evp_key.c index 802e6de3b5..9d9b0af8de 100644 --- a/crypto/evp/evp_key.c +++ b/crypto/evp/evp_key.c @@ -121,19 +121,19 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, EVP_MD_CTX_init(&c); for (;;) { - EVP_DigestInit(&c,md); + EVP_DigestInit_ex(&c,md, NULL); if (addmd++) EVP_DigestUpdate(&c,&(md_buf[0]),mds); EVP_DigestUpdate(&c,data,datal); if (salt != NULL) EVP_DigestUpdate(&c,salt,PKCS5_SALT_LEN); - EVP_DigestFinal(&c,&(md_buf[0]),&mds); + EVP_DigestFinal_ex(&c,&(md_buf[0]),&mds); for (i=1; i<(unsigned int)count; i++) { - EVP_DigestInit(&c,md); + EVP_DigestInit_ex(&c,md, NULL); EVP_DigestUpdate(&c,&(md_buf[0]),mds); - EVP_DigestFinal(&c,&(md_buf[0]),&mds); + EVP_DigestFinal_ex(&c,&(md_buf[0]),&mds); } i=0; if (nkey) |