From 23216dbb7cf175b1e2b6bf3a9904e7b30ba3a03f Mon Sep 17 00:00:00 2001 From: Andrea Manzini Date: Fri, 28 Feb 2020 14:30:24 +0100 Subject: [PATCH] ddoc --- source/gauthenticator.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/gauthenticator.d b/source/gauthenticator.d index 4578ecf..c642e23 100644 --- a/source/gauthenticator.d +++ b/source/gauthenticator.d @@ -27,7 +27,7 @@ import std.format : format; // code adapted from https://github.com/tilaklodha/google-authenticator -// HMAC-based One Time Password(HOTP) +/// HMAC-based One Time Password(HOTP) public string getHOTPToken(const string secret, const ulong interval) { //secret is a base32 encoded string. Converts to a byte array @@ -48,7 +48,7 @@ public string getHOTPToken(const string secret, const ulong interval) return format("%06d",h12); } -//Time-based One Time Password(TOTP) +/// Time-based One Time Password(TOTP) public string getTOTPToken(const string secret) { //The TOTP token is just a HOTP token seeded with every 30 seconds. @@ -57,7 +57,7 @@ public string getTOTPToken(const string secret) return getHOTPToken(secret, interval); } -//RFC 4648 +//RFC 4648 base32 implementation private ubyte[] base32decode(const string message) { int buffer = 0;