Skip to content

Commit 7455597

Browse files
danbevBethGriggs
authored andcommitted
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 c75f87c ("crypto: refactor the crypto module") removed the check where it was previously used. PR-URL: #24822 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 7eda47e commit 7455597

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/node_crypto.cc

-2
Original file line numberDiff line numberDiff line change
@@ -3331,7 +3331,6 @@ bool Hash::HashInit(const char* hash_type) {
33313331
mdctx_.reset();
33323332
return false;
33333333
}
3334-
finalized_ = false;
33353334
return true;
33363335
}
33373336

@@ -3385,7 +3384,6 @@ void Hash::HashDigest(const FunctionCallbackInfo<Value>& args) {
33853384
unsigned int md_len;
33863385

33873386
EVP_DigestFinal_ex(hash->mdctx_.get(), md_value, &md_len);
3388-
hash->finalized_ = true;
33893387

33903388
Local<Value> error;
33913389
MaybeLocal<Value> rc =

src/node_crypto.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -474,14 +474,12 @@ class Hash : public BaseObject {
474474

475475
Hash(Environment* env, v8::Local<v8::Object> wrap)
476476
: BaseObject(env, wrap),
477-
mdctx_(nullptr),
478-
finalized_(false) {
477+
mdctx_(nullptr) {
479478
MakeWeak();
480479
}
481480

482481
private:
483482
EVPMDPointer mdctx_;
484-
bool finalized_;
485483
};
486484

487485
class SignBase : public BaseObject {

0 commit comments

Comments
 (0)