votes up 1

AESGCM key must be 128, 192, or 256 bits.

Exception Class:

Raise code

class AESGCM(object):
    _MAX_SIZE = 2 ** 32

    def __init__(self, key: bytes):
        utils._check_byteslike("key", key)
        if len(key) not in (16, 24, 32):
            raise ValueError("AESGCM key must be 128, 192, or 256 bits.")

        self._key = key

    def generate_key(cls, bit_length: int) -> bytes:
        if not isinstance(bit_length, int):
            raise TypeError("bit_length must be an integer")
😲 Agile task management is now easier than calling a taxi. #Tracklify


Just press the button and we will add solution
to this exception as soon as possible

* As many users press the button, the faster we create a fix

Add a possible fix

Please authorize to post fix