Commit 331b6ec1 authored by Mattias Ellert's avatar Mattias Ellert

Remove redundant _init (already done in _new)

parent 6f662c47
......@@ -197,7 +197,6 @@ static std::string digest_password(const std::string& nonce, const std::string&
std::string ret;
mdctx = EVP_MD_CTX_new();
if(mdctx) {
EVP_MD_CTX_init(mdctx);
EVP_DigestInit_ex(mdctx, EVP_sha1(), NULL);
EVP_DigestUpdate(mdctx, todigest.c_str(), todigest.length());
EVP_DigestFinal_ex(mdctx, md_value, &md_len);
......@@ -221,7 +220,6 @@ static std::string generate_derivedkey(const std::string& password, const std::s
mdctx = EVP_MD_CTX_new();
if(mdctx) {
EVP_MD_CTX_init(mdctx);
for(i = 0; i< iteration; i++) {
EVP_DigestInit_ex(mdctx, EVP_sha1(), NULL);
EVP_DigestUpdate(mdctx, todigest.c_str(), todigest.length());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment