This commit is contained in:
lancegin
2017-06-28 19:36:58 +08:00
parent ed46a8a364
commit c8853d9ae8
6 changed files with 67 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
/*
* @module : BASE32 module to generate the random b32 key
* and decode the secret.
* @author : Gin (gin.lance.inside@hotmail.com)
*/
class Base32 {
}
+10
View File
@@ -0,0 +1,10 @@
/*
* @module : HOTP module to generate and verify HOTP password
* @author : Gin (gin.lance.inside@hotmail.com)
*/
import OTP from './otp';
class HOTP extends OTP {
}
+12
View File
@@ -0,0 +1,12 @@
/*
* @project : jsotp
* @author : Gin (gin.lance.inside@hotmail.com)
* @link : https://github.com/LanceGin/jsotp
* @Disc : a node module to generate and verify one-time passwords
*/
function jsotp(name) {
console.log(`Hello ${name}`);
}
exports.jsotp = jsotp
+20
View File
@@ -0,0 +1,20 @@
/*
* @module : OTP module to generate the password
* @author : Gin (gin.lance.inside@hotmail.com)
*/
export default class OTP {
constructor(secret, digits=6, digest="sha1") {
/*
* This constructor will create OTP instance
*/
this.secret = secret;
this.digits = digits;
this.digest = digest;
};
generate_otp() {
console.log("OTP.generate_otp");
};
}
+8
View File
@@ -0,0 +1,8 @@
/*
* @module : TOTP module to generate and verify TOTP password
* @author : Gin (gin.lance.inside@hotmail.com)
*/
class TOTP {
}
+8
View File
@@ -0,0 +1,8 @@
/*
* @module : Util module to process the datas.
* @author : Gin (gin.lance.inside@hotmail.com)
*/
class Util {
}