diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 0eac04bebbf9c8..d1e1703d2c8ba7 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -72,6 +72,7 @@ using v8::External; using v8::FunctionCallbackInfo; using v8::FunctionTemplate; using v8::HandleScope; +using v8::Int32; using v8::Integer; using v8::Isolate; using v8::Local; @@ -84,6 +85,7 @@ using v8::PropertyAttribute; using v8::ReadOnly; using v8::Signature; using v8::String; +using v8::Uint32; using v8::Value; @@ -2705,9 +2707,9 @@ void CipherBase::Init(const FunctionCallbackInfo& args) { // represent a valid length at this point. unsigned int auth_tag_len; if (args[2]->IsUint32()) { - auth_tag_len = args[2].As()->Value(); + auth_tag_len = args[2].As()->Value(); } else { - CHECK(args[2]->IsInt32() && args[2].As()->Value() == -1); + CHECK(args[2]->IsInt32() && args[2].As()->Value() == -1); auth_tag_len = kNoAuthTagLength; } @@ -2799,9 +2801,9 @@ void CipherBase::InitIv(const FunctionCallbackInfo& args) { // represent a valid length at this point. unsigned int auth_tag_len; if (args[3]->IsUint32()) { - auth_tag_len = args[3].As()->Value(); + auth_tag_len = args[3].As()->Value(); } else { - CHECK(args[3]->IsInt32() && args[3].As()->Value() == -1); + CHECK(args[3]->IsInt32() && args[3].As()->Value() == -1); auth_tag_len = kNoAuthTagLength; } @@ -3002,7 +3004,7 @@ void CipherBase::SetAAD(const FunctionCallbackInfo& args) { CHECK_EQ(args.Length(), 2); CHECK(args[1]->IsInt32()); - int plaintext_len = args[1].As()->Value(); + int plaintext_len = args[1].As()->Value(); if (!cipher->SetAAD(Buffer::Data(args[0]), Buffer::Length(args[0]), plaintext_len))