Lines Matching refs:args
37 void Hash::GetHashes(const FunctionCallbackInfo<Value>& args) {
38 Environment* env = Environment::GetCurrent(args);
52 args.GetReturnValue().Set(ctx.ToJSArray());
88 void Hash::New(const FunctionCallbackInfo<Value>& args) {
89 Environment* env = Environment::GetCurrent(args);
94 if (args[0]->IsObject()) {
95 ASSIGN_OR_RETURN_UNWRAP(&orig, args[0].As<Object>());
98 const Utf8Value hash_type(env->isolate(), args[0]);
103 if (!args[1]->IsUndefined()) {
104 CHECK(args[1]->IsUint32());
105 xof_md_len = Just<unsigned int>(args[1].As<Uint32>()->Value());
108 Hash* hash = new Hash(env, args.This());
147 void Hash::HashUpdate(const FunctionCallbackInfo<Value>& args) {
148 Decode<Hash>(args, [](Hash* hash, const FunctionCallbackInfo<Value>& args,
150 Environment* env = Environment::GetCurrent(args);
154 args.GetReturnValue().Set(r);
158 void Hash::HashDigest(const FunctionCallbackInfo<Value>& args) {
159 Environment* env = Environment::GetCurrent(args);
162 ASSIGN_OR_RETURN_UNWRAP(&hash, args.Holder());
165 if (args.Length() >= 1) {
166 encoding = ParseEncoding(env->isolate(), args[0], BUFFER);
211 args.GetReturnValue().Set(rc.FromMaybe(Local<Value>()));
243 const FunctionCallbackInfo<Value>& args,
246 Environment* env = Environment::GetCurrent(args);
250 CHECK(args[offset]->IsString()); // Hash algorithm
251 Utf8Value digest(env->isolate(), args[offset]);
258 ArrayBufferOrViewContents<char> data(args[offset + 1]);
269 if (UNLIKELY(args[offset + 2]->IsUint32())) {
272 static_cast<uint32_t>(args[offset + 2]
318 void InternalVerifyIntegrity(const v8::FunctionCallbackInfo<v8::Value>& args) {
319 Environment* env = Environment::GetCurrent(args);
321 CHECK_EQ(args.Length(), 3);
323 CHECK(args[0]->IsString());
324 Utf8Value algorithm(env->isolate(), args[0]);
326 CHECK(args[1]->IsString() || IsAnyByteSource(args[1]));
327 ByteSource content = ByteSource::FromStringOrBuffer(env, args[1]);
329 CHECK(args[2]->IsArrayBufferView());
330 ArrayBufferOrViewContents<unsigned char> expected(args[2]);
359 args.GetReturnValue().Set(rc.FromMaybe(Local<Value>()));