#include "third_party/blink/public/platform/web_crypto_key_algorithm.h"
#include <memory>
#include <utility>
#include "base/memory/ptr_util.h"
#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
namespace blink {
WebCryptoAlgorithm CreateHash(WebCryptoAlgorithmId hash) { … }
class WebCryptoKeyAlgorithmPrivate
: public ThreadSafeRefCounted<WebCryptoKeyAlgorithmPrivate> { … };
WebCryptoKeyAlgorithm::WebCryptoKeyAlgorithm(
WebCryptoAlgorithmId id,
std::unique_ptr<WebCryptoKeyAlgorithmParams> params)
: … { … }
WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::AdoptParamsAndCreate(
WebCryptoAlgorithmId id,
WebCryptoKeyAlgorithmParams* params) { … }
WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::CreateAes(
WebCryptoAlgorithmId id,
uint16_t key_length_bits) { … }
WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::CreateHmac(
WebCryptoAlgorithmId hash,
unsigned key_length_bits) { … }
WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::CreateRsaHashed(
WebCryptoAlgorithmId id,
unsigned modulus_length_bits,
const unsigned char* public_exponent,
unsigned public_exponent_size,
WebCryptoAlgorithmId hash) { … }
WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::CreateEc(
WebCryptoAlgorithmId id,
WebCryptoNamedCurve named_curve) { … }
WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::CreateEd25519(
WebCryptoAlgorithmId id) { … }
WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::CreateX25519(
WebCryptoAlgorithmId id) { … }
WebCryptoKeyAlgorithm WebCryptoKeyAlgorithm::CreateWithoutParams(
WebCryptoAlgorithmId id) { … }
bool WebCryptoKeyAlgorithm::IsNull() const { … }
WebCryptoAlgorithmId WebCryptoKeyAlgorithm::Id() const { … }
WebCryptoKeyAlgorithmParamsType WebCryptoKeyAlgorithm::ParamsType() const { … }
WebCryptoAesKeyAlgorithmParams* WebCryptoKeyAlgorithm::AesParams() const { … }
WebCryptoHmacKeyAlgorithmParams* WebCryptoKeyAlgorithm::HmacParams() const { … }
WebCryptoRsaHashedKeyAlgorithmParams* WebCryptoKeyAlgorithm::RsaHashedParams()
const { … }
WebCryptoEcKeyAlgorithmParams* WebCryptoKeyAlgorithm::EcParams() const { … }
void WebCryptoKeyAlgorithm::WriteToDictionary(
WebCryptoKeyAlgorithmDictionary* dict) const { … }
void WebCryptoKeyAlgorithm::Assign(const WebCryptoKeyAlgorithm& other) { … }
void WebCryptoKeyAlgorithm::Reset() { … }
}