Files
servo/components/script
Kingsley Yung 4539c7efde script: Store HashAlgorithmIdentifier as NormalizedAlgorithm (#41395)
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>
2025-12-19 07:20:09 +00:00
..
2025-10-02 07:51:19 +00:00
2025-12-05 07:23:32 +00:00