README.md in otp-0.0.2 vs README.md in otp-0.0.3
- old
+ new
@@ -21,9 +21,14 @@
p totp.digits #=> 6 (number of password digits; default 6)
p totp.period #=> 30 (time step period in second; default 30)
p totp.time #=> nil (UNIX time by Time or Integer; nil for the current time)
p totp.password #=> "123456" (password for the current time)
+ # Format TOTP URI. Otpauth scheme URLs can be read by OTP::URI.parse.
+ totp.issuer = "My Company"
+ totp.accountname = "account@exaple.com"
+ p totp.to_uri #=> "otpauth://totp/My%20Company:account@exaple.com?secret=47JBA7ZWDDLNZJMX&issuer=My+Company"
+
To verify given TOTP password:
require "otp"
totp = OTP::TOTP.new