Add SHA1 support to crypto_data_hash/3
As discussed in https://github.com/mthom/scryer-prolog/discussions/2316, one can use Scryer to verify Github's 2FA.
The default hash algorithm used in TOTP is SHA1, which is also used by Github: https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#manually-configuring-a-totp-app
Relevan't RFCs:
* HOTP: https://datatracker.ietf.org/doc/html/rfc4226
* TOTP: https://datatracker.ietf.org/doc/html/rfc6238
2 条评论