Skip to content

Commit 71442b3

Browse files
authored
script: Migrate deriveBits/get key length operation to use new normalization (servo#39805)
Refactoring of the algorithm normalization in servo#39431 introduces a new algorithm normalization procedure to replace the existing one, and we continue the migration here. This patch is the last piece of this migration. In this patch: - The `SubtleCrypto.deriveKey` and `SubtleCrypto.deriveBits` method are migrated from using existing `normalize_algorithm_for_derive_bits`, `normalize_algorithm_for_import_key` and `normalize_algorithm_for_get_key_length` functions to using the new `normalize_algorithm` function. - The custom types `DeriveBitsAlgorithm`, `ImportKeyAlgorithm` and `GetKeyLengthAlgorithm` used by `normalize_algorithm_for_derive_bits`, `normalize_algorithm_for_import_key` and `normalize_algorithm_for_get_key_length` are removed. - The custom type `DigestAlgorithm` is also removed. - The `SubtleHkdfParams::derive_bits` function is moved to sub-module `hkdf_operation`. - The `Subtlepkdf2Params::derive_bits` function is moved to sub-module `pbkdf2_operation`. - The `SubtleHmacImportParams::get_key_length` function is moved to sub-module `hmac_operation`. - The `get_key_length_for_aes` function is moved to sub-module `aes_operation`. - The `import_key_aes`, `import_key_hkdf`, `import_key_hmac` and `import_key_pbkdf2` are removed since they are no longer in use. Testing: Refactoring. Existing WPT tests suffice. Fixes: Part of servo#39368 Signed-off-by: Kingsley Yung <[email protected]>
1 parent 365f9ee commit 71442b3

File tree

5 files changed

+517
-1041
lines changed

5 files changed

+517
-1041
lines changed

0 commit comments

Comments
 (0)