Skip to content

Commit 62895b2

Browse files
committed
aesio: fix docs
1 parent 1f1def5 commit 62895b2

File tree

1 file changed

+7
-3
lines changed
  • shared-bindings/aesio

1 file changed

+7
-3
lines changed

shared-bindings/aesio/aes.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@
99

1010
// Defined at the end of this file
1111

12+
//| MODE_ECB: int
13+
//| MODE_CBC: int
14+
//| MODE_CTR: int
15+
//|
1216
//| class AES:
1317
//| """Encrypt and decrypt AES streams"""
1418
//|
1519
//| def __init__(self, key: ReadableBuffer, mode: int = 0, iv: Optional[ReadableBuffer] = None, segment_size: int = 8) -> None:
1620
//| """Create a new AES state with the given key.
1721
//|
1822
//| :param ~_typing.ReadableBuffer key: A 16-, 24-, or 32-byte key
19-
//| :param int mode: AES mode to use. One of: AES.MODE_ECB, AES.MODE_CBC, or
20-
//| AES.MODE_CTR
23+
//| :param int mode: AES mode to use. One of: `MODE_ECB`, `MODE_CBC`, or
24+
//| `MODE_CTR`
2125
//| :param ~_typing.ReadableBuffer iv: Initialization vector to use for CBC or CTR mode
2226
//|
2327
//| Additional arguments are supported for legacy reasons.
@@ -30,7 +34,7 @@
3034
//| key = b'Sixteen byte key'
3135
//| inp = b'CircuitPython!!!' # Note: 16-bytes long
3236
//| outp = bytearray(len(inp))
33-
//| cipher = aesio.AES(key, aesio.mode.MODE_ECB)
37+
//| cipher = aesio.AES(key, aesio.MODE_ECB)
3438
//| cipher.encrypt_into(inp, outp)
3539
//| hexlify(outp)"""
3640
//| ...

0 commit comments

Comments
 (0)