Closed tiholic closed 2 years ago
Thanks for your interest in PyOTP. Your expectation here is incorrect; the first parameter expects a string representing the base32 encoding of the secret, not bytes. Having the first parameter be bytes would be confusing as it would make it less clear whether the base32 encoded secret or the raw secret bytes are expected.
This snippet is errored by linter
https://github.com/pyauth/pyotp/blob/6568c1a83af8e0229f3c4b28d03552d601e2b7fe/src/pyotp/otp.py#L11-L12
this should be changed to
def __init__(self, s: bytes, digi...
to fix the problem