#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/public/platform/web_crypto_algorithm.h"
#include <memory>
#include <utility>
#include "base/memory/ptr_util.h"
#include "third_party/blink/public/platform/web_crypto_algorithm_params.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
namespace blink {
namespace {
constexpr WebCryptoAlgorithmInfo kAlgorithmIdToInfo[] = …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
}
class WebCryptoAlgorithmPrivate
: public ThreadSafeRefCounted<WebCryptoAlgorithmPrivate> { … };
WebCryptoAlgorithm::WebCryptoAlgorithm(
WebCryptoAlgorithmId id,
std::unique_ptr<WebCryptoAlgorithmParams> params)
: … { … }
WebCryptoAlgorithm WebCryptoAlgorithm::CreateNull() { … }
WebCryptoAlgorithm WebCryptoAlgorithm::AdoptParamsAndCreate(
WebCryptoAlgorithmId id,
WebCryptoAlgorithmParams* params) { … }
const WebCryptoAlgorithmInfo* WebCryptoAlgorithm::LookupAlgorithmInfo(
WebCryptoAlgorithmId id) { … }
bool WebCryptoAlgorithm::IsNull() const { … }
WebCryptoAlgorithmId WebCryptoAlgorithm::Id() const { … }
WebCryptoAlgorithmParamsType WebCryptoAlgorithm::ParamsType() const { … }
const WebCryptoAesCbcParams* WebCryptoAlgorithm::AesCbcParams() const { … }
const WebCryptoAesCtrParams* WebCryptoAlgorithm::AesCtrParams() const { … }
const WebCryptoAesKeyGenParams* WebCryptoAlgorithm::AesKeyGenParams() const { … }
const WebCryptoHmacImportParams* WebCryptoAlgorithm::HmacImportParams() const { … }
const WebCryptoHmacKeyGenParams* WebCryptoAlgorithm::HmacKeyGenParams() const { … }
const WebCryptoAesGcmParams* WebCryptoAlgorithm::AesGcmParams() const { … }
const WebCryptoRsaOaepParams* WebCryptoAlgorithm::RsaOaepParams() const { … }
const WebCryptoRsaHashedImportParams*
WebCryptoAlgorithm::RsaHashedImportParams() const { … }
const WebCryptoRsaHashedKeyGenParams*
WebCryptoAlgorithm::RsaHashedKeyGenParams() const { … }
const WebCryptoRsaPssParams* WebCryptoAlgorithm::RsaPssParams() const { … }
const WebCryptoEcdsaParams* WebCryptoAlgorithm::EcdsaParams() const { … }
const WebCryptoEcKeyGenParams* WebCryptoAlgorithm::EcKeyGenParams() const { … }
const WebCryptoEcKeyImportParams* WebCryptoAlgorithm::EcKeyImportParams()
const { … }
const WebCryptoEcdhKeyDeriveParams* WebCryptoAlgorithm::EcdhKeyDeriveParams()
const { … }
const WebCryptoAesDerivedKeyParams* WebCryptoAlgorithm::AesDerivedKeyParams()
const { … }
const WebCryptoHkdfParams* WebCryptoAlgorithm::HkdfParams() const { … }
const WebCryptoPbkdf2Params* WebCryptoAlgorithm::Pbkdf2Params() const { … }
bool WebCryptoAlgorithm::IsHash(WebCryptoAlgorithmId id) { … }
bool WebCryptoAlgorithm::IsKdf(WebCryptoAlgorithmId id) { … }
void WebCryptoAlgorithm::Assign(const WebCryptoAlgorithm& other) { … }
void WebCryptoAlgorithm::Reset() { … }
}