From 627ecadb3f6f131f62a760bb58f3f329b9ad1c2c Mon Sep 17 00:00:00 2001 From: dherrada Date: Thu, 2 Jul 2020 11:10:53 -0400 Subject: [PATCH] Did aesio --- shared-bindings/aesio/aes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-bindings/aesio/aes.c b/shared-bindings/aesio/aes.c index f6a0a89b80..11505a0018 100644 --- a/shared-bindings/aesio/aes.c +++ b/shared-bindings/aesio/aes.c @@ -12,7 +12,7 @@ //| class AES: //| """Encrypt and decrypt AES streams""" //| -//| def __init__(self, key, mode=0, iv=None, segment_size=8) -> Any: +//| def __init__(self, key: bytearray, mode: int=0, iv: bytearray=None, segment_size: int=8) -> AES: //| """Create a new AES state with the given key. //| //| :param bytearray key: A 16-, 24-, or 32-byte key @@ -152,7 +152,7 @@ STATIC void validate_length(aesio_aes_obj_t *self, size_t src_length, } } -//| def encrypt_into(src, dest) -> None: +//| def encrypt_into(src: bytes, dest: bytearray) -> None: //| """Encrypt the buffer from ``src`` into ``dest``. //| //| For ECB mode, the buffers must be 16 bytes long. For CBC mode, the @@ -183,7 +183,7 @@ STATIC mp_obj_t aesio_aes_encrypt_into(mp_obj_t aesio_obj, mp_obj_t src, STATIC MP_DEFINE_CONST_FUN_OBJ_3(aesio_aes_encrypt_into_obj, aesio_aes_encrypt_into); -//| def decrypt_into(src, dest) -> None: +//| def decrypt_into(src: bytes, dest: bytearray) -> None: //| //| """Decrypt the buffer from ``src`` into ``dest``. //| For ECB mode, the buffers must be 16 bytes long. For CBC mode, the