From c93fe049d687cf7278e9f5fecfbe34b843ffe07b Mon Sep 17 00:00:00 2001 From: Bruno Miguens Date: Wed, 17 Jul 2019 18:59:24 +0100 Subject: [PATCH] Add code cods --- lib/src/hotp.dart | 9 +++++++++ lib/src/otp.dart | 7 +++---- lib/src/totp.dart | 4 ++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/src/hotp.dart b/lib/src/hotp.dart index 60f3255..390a404 100644 --- a/lib/src/hotp.dart +++ b/lib/src/hotp.dart @@ -18,11 +18,20 @@ class HOTP extends OTP { /// @type {String} /// @desc random base32-encoded key to generate OTP. /// + /// @param {counter} + /// @type {int} + /// @desc the counter value for OTP. + /// This defaults to 0. + /// /// @param {digits} /// @type {int} /// @desc the length of the one-time password. /// This defaults to 6. /// + /// @param {algorithm} + /// @type {OTPAlgorithm} + /// @desc the algorithm to be used on HMAC encoding, dedault to be SHA1 + /// /// @return {HOTP} /// HOTP( diff --git a/lib/src/otp.dart b/lib/src/otp.dart index 2e29531..81273e3 100644 --- a/lib/src/otp.dart +++ b/lib/src/otp.dart @@ -28,10 +28,9 @@ abstract class OTP { /// @type {int} /// @desc the length of the one-time password, default to be 6 /// - /// @param {digest} - /// @type {String} - /// @desc the key that be used to do HMAC encoding, dedault and - /// only to be "sha1" + /// @param {algorithm} + /// @type {OTPAlgorithm} + /// @desc the algorithm to be used on HMAC encoding, dedault to be SHA1 /// /// OTP( diff --git a/lib/src/totp.dart b/lib/src/totp.dart index 15055e2..d48ab96 100644 --- a/lib/src/totp.dart +++ b/lib/src/totp.dart @@ -29,6 +29,10 @@ class TOTP extends OTP { /// @desc the length of the one-time password. /// This defaults to 6. /// + /// @param {algorithm} + /// @type {OTPAlgorithm} + /// @desc the algorithm to be used on HMAC encoding, dedault to be SHA1 + /// /// @return {TOTP} /// TOTP(