#include <stddef.h>
#include <stdint.h>
#include "base/ranges/algorithm.h"
#include "components/webcrypto/algorithm_dispatch.h"
#include "components/webcrypto/algorithms/ec.h"
#include "components/webcrypto/algorithms/test_helpers.h"
#include "components/webcrypto/jwk.h"
#include "components/webcrypto/status.h"
#include "third_party/blink/public/platform/web_crypto_algorithm_params.h"
#include "third_party/blink/public/platform/web_crypto_key_algorithm.h"
namespace webcrypto {
namespace {
blink::WebCryptoAlgorithm CreateEcdhImportAlgorithm(
blink::WebCryptoNamedCurve named_curve) { … }
blink::WebCryptoAlgorithm CreateEcdhDeriveParams(
const blink::WebCryptoKey& public_key) { … }
blink::WebCryptoAlgorithm CreateAesGcmDerivedKeyParams(uint16_t length_bits) { … }
struct KeyPair { … };
KeyPair ImportKeysFromTest(const base::Value::Dict& test) { … }
class WebCryptoEcdhTest : public WebCryptoTestBase { … };
TEST_F(WebCryptoEcdhTest, DeriveBitsKnownAnswer) { … }
KeyPair LoadTestKeys() { … }
TEST_F(WebCryptoEcdhTest, DeriveKeyBadAesLength) { … }
TEST_F(WebCryptoEcdhTest, DeriveKeyUnsupportedAesLength) { … }
TEST_F(WebCryptoEcdhTest, DeriveKeyZeroLengthHmac) { … }
TEST_F(WebCryptoEcdhTest, DeriveKeyHmac19Bits) { … }
TEST_F(WebCryptoEcdhTest, DeriveKeyHmacSha256NoLength) { … }
TEST_F(WebCryptoEcdhTest, DeriveKeyHmacSha512NoLength) { … }
TEST_F(WebCryptoEcdhTest, DeriveKeyAes128) { … }
TEST_F(WebCryptoEcdhTest, ImportKeyEmptyUsage) { … }
}
}