Skip to content

Commit 9b000e5

Browse files
danbevMylesBorins
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 <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 90d481e commit 9b000e5

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
@@ -3431,7 +3431,6 @@ bool Hash::HashInit(const char* hash_type) {
34313431
mdctx_.reset();
34323432
return false;
34333433
}
3434-
finalized_ = false;
34353434
return true;
34363435
}
34373436

@@ -3485,7 +3484,6 @@ void Hash::HashDigest(const FunctionCallbackInfo<Value>& args) {
34853484
unsigned int md_len;
34863485

34873486
EVP_DigestFinal_ex(hash->mdctx_.get(), md_value, &md_len);
3488-
hash->finalized_ = true;
34893487

34903488
Local<Value> error;
34913489
MaybeLocal<Value> rc =

src/node_crypto.h

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

477477
Hash(Environment* env, v8::Local<v8::Object> wrap)
478478
: BaseObject(env, wrap),
479-
mdctx_(nullptr),
480-
finalized_(false) {
479+
mdctx_(nullptr) {
481480
MakeWeak();
482481
}
483482

484483
private:
485484
EVPMDPointer mdctx_;
486-
bool finalized_;
487485
};
488486

489487
class SignBase : public BaseObject {

0 commit comments

Comments
 (0)