MCPcopy
hub / github.com/pyca/cryptography / AES

Class AES

src/cryptography/hazmat/primitives/ciphers/algorithms.py:36–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35
36class AES(BlockCipherAlgorithm):
37 name = "AES"
38 block_size = 128
39 # 512 added to support AES-256-XTS, which uses 512-bit keys
40 key_sizes = frozenset([128, 192, 256, 512])
41
42 def __init__(self, key: utils.Buffer):
43 self.key = _verify_key_size(self, key)
44
45 @property
46 def key_size(self) -> int:
47 return len(self.key) * 8
48
49
50class AES128(BlockCipherAlgorithm):

Callers 15

_wrap_coreFunction · 0.90
_unwrap_coreFunction · 0.90
test_aes_cmacFunction · 0.90
test_key_sizeMethod · 0.90
test_invalid_key_sizeMethod · 0.90
test_invalid_key_typeMethod · 0.90
test_update_intoMethod · 0.90
test_update_into_gcmMethod · 0.90

Calls

no outgoing calls