import typing


def _secret_key(secret_key: typing.Union[bytes, str]) -> bytes:
    """ensure bytes"""
    if isinstance(secret_key, str):
        return secret_key.encode('latin1')
    return secret_key