mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibCrypto+AK: Merge LibCrypto/SecureRandom into AK/Random
AK/Random is already the same as SecureRandom. See PR for more details. ProcessPrng is used on Windows for compatibility w/ sandboxing measures See e.g. https://crbug.com/40277768
This commit is contained in:
committed by
Jelle Raaijmakers
parent
d942b98549
commit
bf7fd80140
Notes:
github-actions[bot]
2026-02-06 11:11:30 +00:00
Author: https://github.com/colleirose 🔰 Commit: https://github.com/LadybirdBrowser/ladybird/commit/bf7fd801405 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6564 Reviewed-by: https://github.com/R-Goc Reviewed-by: https://github.com/gmta
@@ -11,6 +11,7 @@
|
||||
#include <AK/Base64.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/QuickSort.h>
|
||||
#include <AK/Random.h>
|
||||
#include <LibCrypto/ASN1/ASN1.h>
|
||||
#include <LibCrypto/ASN1/Constants.h>
|
||||
#include <LibCrypto/ASN1/DER.h>
|
||||
@@ -29,7 +30,6 @@
|
||||
#include <LibCrypto/PK/MLDSA.h>
|
||||
#include <LibCrypto/PK/MLKEM.h>
|
||||
#include <LibCrypto/PK/RSA.h>
|
||||
#include <LibCrypto/SecureRandom.h>
|
||||
#include <LibJS/Runtime/Array.h>
|
||||
#include <LibJS/Runtime/ArrayBuffer.h>
|
||||
#include <LibJS/Runtime/DataView.h>
|
||||
@@ -274,7 +274,7 @@ static WebIDL::ExceptionOr<void> validate_jwk_key_ops(JS::Realm& realm, Bindings
|
||||
static WebIDL::ExceptionOr<ByteBuffer> generate_random_key(JS::VM& vm, u16 const size_in_bits)
|
||||
{
|
||||
auto key_buffer = TRY_OR_THROW_OOM(vm, ByteBuffer::create_uninitialized(size_in_bits / 8));
|
||||
::Crypto::fill_with_secure_random(key_buffer);
|
||||
fill_with_random(key_buffer);
|
||||
return key_buffer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user