File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -509,16 +509,17 @@ Maybe<void> ExportJWKAsymmetricKey(Environment* env,
509509std::shared_ptr<KeyObjectData> ImportJWKAsymmetricKey (
510510 Environment* env,
511511 Local<Object> jwk,
512- const char * kty,
512+ std::string_view kty,
513513 const FunctionCallbackInfo<Value>& args,
514514 unsigned int offset) {
515- if (strcmp ( kty, " RSA " ) == 0 ) {
515+ if (kty == " RSA " ) {
516516 return ImportJWKRsaKey (env, jwk, args, offset);
517- } else if (strcmp ( kty, " EC " ) == 0 ) {
517+ } else if (kty == " EC " ) {
518518 return ImportJWKEcKey (env, jwk, args, offset);
519519 }
520520
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 ());
522523 return std::shared_ptr<KeyObjectData>();
523524}
524525
You can’t perform that action at this time.
0 commit comments