mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 16:02:53 +00:00
LibWeb: Store PBKDF2Params' salt field as a ByteBuffer directly
Rather than trying to store a Handle to a WebIDL::BufferSource, let's look ahead to what the spec wants us to do with this field and get a copy of the bytes held by the buffer source right away.
This commit is contained in:
parent
a0623a47de
commit
497f3ca0fd
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/ADKaster
Commit: 497f3ca0fd
Pull-request: https://github.com/SerenityOS/serenity/pull/23596
Reviewed-by: https://github.com/alimpfard
2 changed files with 4 additions and 5 deletions
|
@ -39,7 +39,7 @@ struct AlgorithmParams {
|
|||
// https://w3c.github.io/webcrypto/#pbkdf2-params
|
||||
struct PBKDF2Params : public AlgorithmParams {
|
||||
virtual ~PBKDF2Params() override;
|
||||
PBKDF2Params(String name, JS::Handle<WebIDL::BufferSource> salt, u32 iterations, HashAlgorithmIdentifier hash)
|
||||
PBKDF2Params(String name, ByteBuffer salt, u32 iterations, HashAlgorithmIdentifier hash)
|
||||
: AlgorithmParams(move(name))
|
||||
, salt(move(salt))
|
||||
, iterations(iterations)
|
||||
|
@ -47,7 +47,7 @@ struct PBKDF2Params : public AlgorithmParams {
|
|||
{
|
||||
}
|
||||
|
||||
JS::Handle<WebIDL::BufferSource> salt;
|
||||
ByteBuffer salt;
|
||||
u32 iterations;
|
||||
HashAlgorithmIdentifier hash;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue