Lines Matching refs:args
66 void Hmac::New(const FunctionCallbackInfo<Value>& args) {
67 Environment* env = Environment::GetCurrent(args);
68 new Hmac(env, args.This());
88 void Hmac::HmacInit(const FunctionCallbackInfo<Value>& args) {
90 ASSIGN_OR_RETURN_UNWRAP(&hmac, args.Holder());
93 const node::Utf8Value hash_type(env->isolate(), args[0]);
94 ByteSource key = ByteSource::FromSecretKeyBytes(env, args[1]);
104 void Hmac::HmacUpdate(const FunctionCallbackInfo<Value>& args) {
105 Decode<Hmac>(args, [](Hmac* hmac, const FunctionCallbackInfo<Value>& args,
107 Environment* env = Environment::GetCurrent(args);
111 args.GetReturnValue().Set(r);
115 void Hmac::HmacDigest(const FunctionCallbackInfo<Value>& args) {
116 Environment* env = Environment::GetCurrent(args);
119 ASSIGN_OR_RETURN_UNWRAP(&hmac, args.Holder());
122 if (args.Length() >= 1) {
123 encoding = ParseEncoding(env->isolate(), args[0], BUFFER);
149 args.GetReturnValue().Set(rc.FromMaybe(Local<Value>()));
177 const FunctionCallbackInfo<Value>& args,
180 Environment* env = Environment::GetCurrent(args);
184 CHECK(args[offset]->IsUint32()); // SignConfiguration::Mode
186 static_cast<SignConfiguration::Mode>(args[offset].As<Uint32>()->Value());
188 CHECK(args[offset + 1]->IsString()); // Hash
189 CHECK(args[offset + 2]->IsObject()); // Key
191 Utf8Value digest(env->isolate(), args[offset + 1]);
199 ASSIGN_OR_RETURN_UNWRAP(&key, args[offset + 2], Nothing<bool>());
202 ArrayBufferOrViewContents<char> data(args[offset + 3]);
211 if (!args[offset + 4]->IsUndefined()) {
212 ArrayBufferOrViewContents<char> signature(args[offset + 4]);