mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Implement crypto.subtle.sign/verify
with HMAC (#34223)
* Allow importing HMAC keys Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement crypto.subtle.sign with HMAC Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement crypto.subtle.verify with HMAC Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
deddcf2c7a
commit
8d3d7b7403
7 changed files with 461 additions and 531 deletions
|
@ -28,6 +28,7 @@ pub enum Handle {
|
|||
Aes256(Vec<u8>),
|
||||
Pbkdf2(Vec<u8>),
|
||||
Hkdf(Vec<u8>),
|
||||
Hmac(Vec<u8>),
|
||||
}
|
||||
|
||||
/// <https://w3c.github.io/webcrypto/#cryptokey-interface>
|
||||
|
@ -150,6 +151,7 @@ impl Handle {
|
|||
Self::Aes256(bytes) => bytes,
|
||||
Self::Pbkdf2(bytes) => bytes,
|
||||
Self::Hkdf(bytes) => bytes,
|
||||
Self::Hmac(bytes) => bytes,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue