olsio / otp-client

MIT License
11 stars 6 forks source link

Generating Invalid otp for sha256 and sha512 #15

Open shahmilan34 opened 4 years ago

shahmilan34 commented 4 years ago

Using this library in react native app for totp generation. For sha1 it is generating correct otp but facing issue with sha256 and sha512.

shahmilan34 commented 4 years ago

Testing against this data otpauth://totp/app:milan?secret=GBCFE4LOGY3EK3KLJV2TIQTYNBLWQTLF&digits=6&algorithm=SHA512&issuer=app&period=30

For this totp QR code url generated by web application FreeOTP is generating correct otp while using this library working only for sha1. Facing issue for sha256 and sha512