#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/webcrypto/fuzzer_support.h"
#include "base/command_line.h"
#include "base/containers/span.h"
#include "base/no_destructor.h"
#include "base/task/single_thread_task_executor.h"
#include "components/webcrypto/algorithm_dispatch.h"
#include "components/webcrypto/status.h"
#include "mojo/core/embedder/embedder.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_crypto_algorithm_params.h"
#include "third_party/blink/public/web/blink.h"
namespace webcrypto {
namespace {
class InitOnce : public blink::Platform { … };
void EnsureInitialized() { … }
blink::WebCryptoAlgorithm CreateRsaHashedImportAlgorithm(
blink::WebCryptoAlgorithmId id,
blink::WebCryptoAlgorithmId hash_id) { … }
blink::WebCryptoAlgorithm CreateEcImportAlgorithm(
blink::WebCryptoAlgorithmId id,
blink::WebCryptoNamedCurve named_curve) { … }
}
blink::WebCryptoKeyUsageMask GetCompatibleKeyUsages(
blink::WebCryptoKeyFormat format) { … }
void ImportEcKeyFromDerFuzzData(const uint8_t* data,
size_t size,
blink::WebCryptoKeyFormat format) { … }
void ImportEcKeyFromRawFuzzData(const uint8_t* data, size_t size) { … }
void ImportRsaKeyFromDerFuzzData(const uint8_t* data,
size_t size,
blink::WebCryptoKeyFormat format) { … }
}