(self, key_size, hash_type)
| 26 | IV_SIZE = 128 |
| 27 | |
| 28 | def __init__(self, key_size, hash_type): |
| 29 | self.name = f"A{key_size}CBC-HS{hash_type}" |
| 30 | tpl = "AES_{}_CBC_HMAC_SHA_{} authenticated encryption algorithm" |
| 31 | self.description = tpl.format(key_size, hash_type) |
| 32 | |
| 33 | # bit length |
| 34 | self.key_size = key_size |
| 35 | # byte length |
| 36 | self.key_len = key_size // 8 |
| 37 | |
| 38 | self.CEK_SIZE = key_size * 2 |
| 39 | self.hash_alg = getattr(hashlib, f"sha{hash_type}") |
| 40 | |
| 41 | def _hmac(self, ciphertext, aad, iv, key): |
| 42 | al = encode_int(len(aad) * 8, 64) |
nothing calls this directly
no outgoing calls
no test coverage detected