'Returns ``str`` with a length of 24 or 32.
Length restriction are required for key type secrets because of
requirements in AES.
:param encoded_bytes: ``str`` must be at least 32 charters long'

def _key_gen(self, encoded_bytes):

    return encoded_bytes[:random.choice([24, 32])]
