20 void encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
21 void decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
23 void clear()
override;
25 std::string
name()
const override {
return "SM4"; }
27 std::unique_ptr<BlockCipher>
new_object()
const override {
return std::make_unique<SM4>(); }
29 std::string
provider()
const override;
34 void key_schedule(std::span<const uint8_t> key)
override;
36#if defined(BOTAN_HAS_SM4_ARMV8)
37 void sm4_armv8_encrypt(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
38 void sm4_armv8_decrypt(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
41#if defined(BOTAN_HAS_SM4_GFNI)
42 void sm4_gfni_encrypt(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
43 void sm4_gfni_decrypt(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;