Skip to content

Commit 3b20043

Browse files
Add docstring for the ChaCha20 algorithm
1 parent 2a95278 commit 3b20043

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

crypto/ChaCha20.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from typing import List
2+
import struct
3+
4+
__all__ = ['ChaCha20']
5+
class ChaCha20:
6+
"""
7+
Implementation of the ChaCha20 stream cipher.
8+
9+
Attributes
10+
----------
11+
key : bytes
12+
32-byte (256-bit) encryption key.
13+
nonce : bytes
14+
12-byte (96-bit) nonce.
15+
counter : int
16+
32-bit counter, typically starts at 0.
17+
"""

0 commit comments

Comments
 (0)