mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 23:30:20 +00:00
LibWeb: Implement wrapKey
and unwrapKey
methods
This implements the last WebCryptoAPI methods `wrapKey` and `unwrapKey`. Most of the functionality is already there because they rely on `encrypt` and `decrypt`. The only test failures are for `AES-GCM` which is not implemented yet.
This commit is contained in:
parent
c1a65f3d53
commit
584cbcf3ef
Notes:
github-actions[bot]
2024-12-16 10:35:53 +00:00
Author: https://github.com/devgianlu
Commit: 584cbcf3ef
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2915
8 changed files with 1221 additions and 2 deletions
|
@ -337,6 +337,16 @@ public:
|
|||
return WebIDL::NotSupportedError::create(m_realm, "getKeyLength is not supported"_string);
|
||||
}
|
||||
|
||||
virtual WebIDL::ExceptionOr<GC::Ref<JS::ArrayBuffer>> wrap_key(AlgorithmParams const&, GC::Ref<CryptoKey>, ByteBuffer const&)
|
||||
{
|
||||
return WebIDL::NotSupportedError::create(m_realm, "wrapKey is not supported"_string);
|
||||
}
|
||||
|
||||
virtual WebIDL::ExceptionOr<GC::Ref<JS::ArrayBuffer>> unwrap_key(AlgorithmParams const&, GC::Ref<CryptoKey>, ByteBuffer const&)
|
||||
{
|
||||
return WebIDL::NotSupportedError::create(m_realm, "unwwrapKey is not supported"_string);
|
||||
}
|
||||
|
||||
static NonnullOwnPtr<AlgorithmMethods> create(JS::Realm& realm) { return adopt_own(*new AlgorithmMethods(realm)); }
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue