def totp(key, t, digits=6, step=30):
    """
    These test vectors come from RFC-6238
    (https://tools.ietf.org/html/rfc6238#appendix-B).
    >>> import datetime
    >>> key = b'12345678901234567890'
    >>> totp(key, datetime.datetime.fromtimestamp(59), digits=8)
    '94287082'
    >>> totp(key, datetime.datetime.fromtimestamp(1111111109), digits=8)
    '07081804'
    >>> totp(key, datetime.datetime.fromtimestamp(20000000000), digits=8)
    '65353130'
    """
    return hotp(key, T(t, step), digits)