|
12 | 12 | //| class AES: |
13 | 13 | //| """Encrypt and decrypt AES streams""" |
14 | 14 | //| |
15 | | -//| def __init__(self, key, mode=0, iv=None, segment_size=8) -> Any: |
| 15 | +//| def __init__(self, key: bytearray, mode: int=0, iv: bytearray=None, segment_size: int=8) -> AES: |
16 | 16 | //| """Create a new AES state with the given key. |
17 | 17 | //| |
18 | 18 | //| :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, |
152 | 152 | } |
153 | 153 | } |
154 | 154 |
|
155 | | -//| def encrypt_into(src, dest) -> None: |
| 155 | +//| def encrypt_into(src: bytes, dest: bytearray) -> None: |
156 | 156 | //| """Encrypt the buffer from ``src`` into ``dest``. |
157 | 157 | //| |
158 | 158 | //| 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, |
183 | 183 | STATIC MP_DEFINE_CONST_FUN_OBJ_3(aesio_aes_encrypt_into_obj, |
184 | 184 | aesio_aes_encrypt_into); |
185 | 185 |
|
186 | | -//| def decrypt_into(src, dest) -> None: |
| 186 | +//| def decrypt_into(src: bytes, dest: bytearray) -> None: |
187 | 187 | //| |
188 | 188 | //| """Decrypt the buffer from ``src`` into ``dest``. |
189 | 189 | //| For ECB mode, the buffers must be 16 bytes long. For CBC mode, the |
|
0 commit comments