mirror of
https://github.com/servo/servo
synced 2026-05-12 01:46:28 +02:00
For some dictionaries in SubtleCrypto interface, we store the hash field of `HashAlgorithmIdentifier` type as a `SubtleKeyAlgorithm`. The conversion to `SubtleKeyAlgorithm` is unnecessary. Moreover, `SubtleKeyAlgorithm` is not supposed to be used there. This patch fixes it by simply storing them as the normalized algorithm given by Step 10.1.3 of normalization [1], for those hash field of `HashAlgorithmIdentifier` type. [1] https://w3c.github.io/webcrypto/#algorithm-normalization-normalize-an-algorithm Testing: Refactoring. Existing tests suffice. --------- Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>