Skip to content

Commit

Permalink
Change ImportKeyAlgorithmParams hash to AlgorithmIdentifier. (#1896)
Browse files Browse the repository at this point in the history
b/213220683
  • Loading branch information
aee-google authored Nov 10, 2023
1 parent ffe10ac commit 21626ed
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 21626ed

Please sign in to comment.