Skip to content

Commit

Permalink
Cherry pick PR #1896: Change ImportKeyAlgorithmParams hash to Algorit…
Browse files Browse the repository at this point in the history
…hmIdentifier. (#1973)

Refer to the original PR: #1896

b/213220683

Co-authored-by: aee <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and aee-google authored Nov 29, 2023
1 parent 7ada8b1 commit 9988a77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cobalt/subtlecrypto/import_key_algorithm_params.idl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

dictionary ImportKeyAlgorithmParams : Algorithm {
// The inner hash function to use.
DOMString hash;
AlgorithmIdentifier hash;
// The length (in bits) of the key.
unsigned long length;
};
2 changes: 1 addition & 1 deletion cobalt/subtlecrypto/subtle_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ PromiseWrappable SubtleCrypto::ImportKey(
algorithm.AsType<ImportKeyAlgorithmParams>();
// 29.6.2 Set hash to equal the hash member of normalizedAlgorithm.
if (algo_params.has_hash()) {
cryptoKey->set_hash(algo_params.hash());
cryptoKey->set_hash(get_name_or_string(algo_params.hash()));
}
}
// 12. Resolve promise with result.
Expand Down

0 comments on commit 9988a77

Please sign in to comment.