#include <stddef.h>
#include <stdint.h>
#include <memory>
#include "base/values.h"
#include "components/webcrypto/algorithm_dispatch.h"
#include "components/webcrypto/algorithms/test_helpers.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 CreateAesKwKeyGenAlgorithm(uint16_t key_length_bits) { … }
class WebCryptoAesKwTest : public WebCryptoTestBase { … };
struct AesKwKnownAnswer { … };
const AesKwKnownAnswer kAesKwKnownAnswers[] = …;
TEST_F(WebCryptoAesKwTest, GenerateKeyBadLength) { … }
TEST_F(WebCryptoAesKwTest, GenerateKeyEmptyUsage) { … }
TEST_F(WebCryptoAesKwTest, ImportKeyEmptyUsage) { … }
TEST_F(WebCryptoAesKwTest, ImportKeyJwkKeyOpsWrapUnwrap) { … }
TEST_F(WebCryptoAesKwTest, ImportExportJwk) { … }
TEST_F(WebCryptoAesKwTest, AesKwKeyImport) { … }
TEST_F(WebCryptoAesKwTest, UnwrapFailures) { … }
TEST_F(WebCryptoAesKwTest, AesKwRawSymkeyWrapUnwrapKnownAnswer) { … }
TEST_F(WebCryptoAesKwTest, AesKwRawSymkeyUnwrapSignVerifyHmac) { … }
TEST_F(WebCryptoAesKwTest, AesKwRawSymkeyWrapUnwrapErrors) { … }
TEST_F(WebCryptoAesKwTest, AesKwRawSymkeyUnwrapCorruptData) { … }
TEST_F(WebCryptoAesKwTest, AesKwJwkSymkeyUnwrapKnownData) { … }
TEST_F(WebCryptoAesKwTest, ImportKeyBadUsage_Raw) { … }
TEST_F(WebCryptoAesKwTest, UnwrapHmacKeyBadUsage_JWK) { … }
TEST_F(WebCryptoAesKwTest, UnwrapRsaSsaPublicKeyBadUsage_JWK) { … }
}
}