mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibWeb: Omit padding in WebCrypto AES-CBC exportKey
This commit is contained in:
parent
15121d63ad
commit
3553861046
Notes:
github-actions[bot]
2024-10-28 20:16:50 +00:00
Author: https://github.com/BenWiederhake
Commit: 3553861046
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2016
3 changed files with 5 additions and 3 deletions
|
@ -1342,7 +1342,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Object>> AesCbc::export_key(Bindings::K
|
|||
|
||||
// 3. Set the k attribute of jwk to be a string containing the raw octets of the key represented by [[handle]] internal slot of key, encoded according to Section 6.4 of JSON Web Algorithms [JWA].
|
||||
auto const& key_bytes = handle.get<ByteBuffer>();
|
||||
jwk.k = TRY_OR_THROW_OOM(m_realm->vm(), encode_base64url(key_bytes));
|
||||
jwk.k = TRY_OR_THROW_OOM(m_realm->vm(), encode_base64url(key_bytes, AK::OmitPadding::Yes));
|
||||
|
||||
// 4. -> If the length attribute of key is 128:
|
||||
// Set the alg attribute of jwk to the string "A128CBC".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue