+5
-4
lines changedFilter options
+5
-4
lines changed Original file line number Diff line number Diff line change
@@ -509,16 +509,17 @@ Maybe<void> ExportJWKAsymmetricKey(Environment* env,
509
509
std::shared_ptr<KeyObjectData> ImportJWKAsymmetricKey(
510
510
Environment* env,
511
511
Local<Object> jwk,
512
-
const char* kty,
512
+
std::string_view kty,
513
513
const FunctionCallbackInfo<Value>& args,
514
514
unsigned int offset) {
515
-
if (strcmp(kty, "RSA") == 0) {
515
+
if (kty == "RSA") {
516
516
return ImportJWKRsaKey(env, jwk, args, offset);
517
-
} else if (strcmp(kty, "EC") == 0) {
517
+
} else if (kty == "EC") {
518
518
return ImportJWKEcKey(env, jwk, args, offset);
519
519
}
520
520
521
-
THROW_ERR_CRYPTO_INVALID_JWK(env, "%s is not a supported JWK key type", kty);
521
+
THROW_ERR_CRYPTO_INVALID_JWK(
522
+
env, "%s is not a supported JWK key type", kty.data());
522
523
return std::shared_ptr<KeyObjectData>();
523
524
}
524
525
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4