1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-27 08:38:07 +00:00

core/crypto: Add AES mode constants.

This commit is contained in:
Andrew Kozlik 2019-08-08 15:14:53 +02:00
parent 9f4f704856
commit 8297b81cd5
2 changed files with 10 additions and 0 deletions

View File

@ -36,6 +36,11 @@ enum AESMode {
/// """
/// AES context.
/// """
/// ECB: int
/// CBC: int
/// CFB: int
/// OFB: int
/// CTR: int
typedef struct _mp_obj_AES_t {
mp_obj_base_t base;
aes_encrypt_ctx encrypt_ctx;

View File

@ -6,6 +6,11 @@ class aes:
"""
AES context.
"""
ECB: int
CBC: int
CFB: int
OFB: int
CTR: int
def __init__(self, mode: int, key: bytes, iv: bytes = None) -> None:
"""