@staticmethod
def verify_token(token: bytes):
    """Checks if the given token is of correct type and length."""
    if not isinstance(token, bytes):
        raise TypeError('Token must be bytes')
    if len(token) != 16:
        raise ValueError('Wrong token length')
