Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1e5de6f

Browse filesBrowse files
tniessenaddaleax
authored andcommitted
crypto: add using directives for v8::Int32, Uint32
Backport-PR-URL: #20706 PR-URL: #20225 Refs: #20039 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent f5e7010 commit 1e5de6f
Copy full SHA for 1e5de6f

File tree

Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+7-5Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ using v8::External;
7272
using v8::FunctionCallbackInfo;
7373
using v8::FunctionTemplate;
7474
using v8::HandleScope;
75+
using v8::Int32;
7576
using v8::Integer;
7677
using v8::Isolate;
7778
using v8::Local;
@@ -84,6 +85,7 @@ using v8::PropertyAttribute;
8485
using v8::ReadOnly;
8586
using v8::Signature;
8687
using v8::String;
88+
using v8::Uint32;
8789
using v8::Value;
8890

8991

@@ -2698,9 +2700,9 @@ void CipherBase::Init(const FunctionCallbackInfo<Value>& args) {
26982700
// represent a valid length at this point.
26992701
unsigned int auth_tag_len;
27002702
if (args[2]->IsUint32()) {
2701-
auth_tag_len = args[2].As<v8::Uint32>()->Value();
2703+
auth_tag_len = args[2].As<Uint32>()->Value();
27022704
} else {
2703-
CHECK(args[2]->IsInt32() && args[2].As<v8::Int32>()->Value() == -1);
2705+
CHECK(args[2]->IsInt32() && args[2].As<Int32>()->Value() == -1);
27042706
auth_tag_len = kNoAuthTagLength;
27052707
}
27062708

@@ -2792,9 +2794,9 @@ void CipherBase::InitIv(const FunctionCallbackInfo<Value>& args) {
27922794
// represent a valid length at this point.
27932795
unsigned int auth_tag_len;
27942796
if (args[3]->IsUint32()) {
2795-
auth_tag_len = args[3].As<v8::Uint32>()->Value();
2797+
auth_tag_len = args[3].As<Uint32>()->Value();
27962798
} else {
2797-
CHECK(args[3]->IsInt32() && args[3].As<v8::Int32>()->Value() == -1);
2799+
CHECK(args[3]->IsInt32() && args[3].As<Int32>()->Value() == -1);
27982800
auth_tag_len = kNoAuthTagLength;
27992801
}
28002802

@@ -2998,7 +3000,7 @@ void CipherBase::SetAAD(const FunctionCallbackInfo<Value>& args) {
29983000

29993001
CHECK_EQ(args.Length(), 2);
30003002
CHECK(args[1]->IsInt32());
3001-
int plaintext_len = args[1].As<v8::Int32>()->Value();
3003+
int plaintext_len = args[1].As<Int32>()->Value();
30023004

30033005
if (!cipher->SetAAD(Buffer::Data(args[0]), Buffer::Length(args[0]),
30043006
plaintext_len))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.