pydantic / pydantic-extra-types

Extra Pydantic types.
MIT License
181 stars 48 forks source link

Add OTP Type to Types #9

Open yezz123 opened 1 year ago

yezz123 commented 1 year ago

https://github.com/pydantic/pydantic/pull/5011

kkirsche commented 1 year ago

Does this requires more specificity in the naming, as there are more than one type of OTP? For example: HOTP and TOTP

The “H” in HOTP stands for Hash-based Message Authentication Code (HMAC). Put in layman’s terms, HMAC-based One-time Password algorithm (HOTP) is an event-based OTP where the moving factor in each code is based on a counter.

Time-based One-time Password (TOTP) is a time-based OTP. The seed for TOTP is static, just like in HOTP, but the moving factor in a TOTP is time-based rather than counter-based.

yezz123 commented 1 year ago

Does this requires more specificity in the naming, as there are more than one type of OTP? For example: HOTP and TOTP

The “H” in HOTP stands for Hash-based Message Authentication Code (HMAC). Put in layman’s terms, HMAC-based One-time Password algorithm (HOTP) is an event-based OTP where the moving factor in each code is based on a counter.

Time-based One-time Password (TOTP) is a time-based OTP. The seed for TOTP is static, just like in HOTP, but the moving factor in a TOTP is time-based rather than counter-based.

Basically, currently we are planning to support only One-time password using PyOTP