src: remove finalized_ member from Hash class

This commit removes the finalized_ member from the Hash class as it does
not seem to be used in any valuable way. Commit c75f87cc4c ("crypto:
refactor the crypto module") removed the check where it was previously
used.

PR-URL: https://github.com/nodejs/node/pull/24822
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Daniel Bevenius authored and Rod Vagg committed 2019-02-28 23:37:40 +11:00
1 parent b82315afcb
commit 8728bc8acd
2 files changed
+1 -5

No files matched your search

-2
View File
@@ -3331,7 +3331,6 @@ bool Hash::HashInit(const char* hash_type) {
mdctx_.reset();
return false;
}
finalized_ = false;
return true;
}
@@ -3385,7 +3384,6 @@ void Hash::HashDigest(const FunctionCallbackInfo<Value>& args) {
unsigned int md_len;
EVP_DigestFinal_ex(hash->mdctx_.get(), md_value, &md_len);
hash->finalized_ = true;
Local<Value> error;
MaybeLocal<Value> rc =
+1 -3
View File
@@ -474,14 +474,12 @@ class Hash : public BaseObject {
Hash(Environment* env, v8::Local<v8::Object> wrap)
: BaseObject(env, wrap),
mdctx_(nullptr),
finalized_(false) {
mdctx_(nullptr) {
MakeWeak();
}
private:
EVPMDPointer mdctx_;
bool finalized_;
};
class SignBase : public BaseObject {