mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 15:02:56 +00:00
LibWeb: Implement WebCrypto AES-CBC generateKey operation
This is progress towards passing more WPT tests, although none of them gets green due to this commit.
This commit is contained in:
parent
9255a1ac2e
commit
d86dcac4f7
Notes:
github-actions[bot]
2024-10-26 15:51:32 +00:00
Author: https://github.com/BenWiederhake
Commit: d86dcac4f7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1971
3 changed files with 126 additions and 6 deletions
|
@ -180,6 +180,36 @@ struct EcKeyGenParams : public AlgorithmParams {
|
|||
static JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> from_value(JS::VM&, JS::Value);
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webcrypto/#dfn-AesKeyGenParams
|
||||
struct AesKeyGenParams : public AlgorithmParams {
|
||||
virtual ~AesKeyGenParams() override;
|
||||
|
||||
AesKeyGenParams(String name, u16 length)
|
||||
: AlgorithmParams(move(name))
|
||||
, length(length)
|
||||
{
|
||||
}
|
||||
|
||||
u16 length;
|
||||
|
||||
static JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> from_value(JS::VM&, JS::Value);
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webcrypto/#dfn-AesDerivedKeyParams
|
||||
struct AesDerivedKeyParams : public AlgorithmParams {
|
||||
virtual ~AesDerivedKeyParams() override;
|
||||
|
||||
AesDerivedKeyParams(String name, u16 length)
|
||||
: AlgorithmParams(move(name))
|
||||
, length(length)
|
||||
{
|
||||
}
|
||||
|
||||
u16 length;
|
||||
|
||||
static JS::ThrowCompletionOr<NonnullOwnPtr<AlgorithmParams>> from_value(JS::VM&, JS::Value);
|
||||
};
|
||||
|
||||
class AlgorithmMethods {
|
||||
public:
|
||||
virtual ~AlgorithmMethods();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue