mirror of
https://github.com/LanceGin/jsotp.git
synced 2026-05-05 00:00:03 +08:00
backup
This commit is contained in:
@@ -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
@@ -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 {
|
||||
|
||||
}
|
||||
@@ -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
@@ -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");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* @module : TOTP module to generate and verify TOTP password
|
||||
* @author : Gin (gin.lance.inside@hotmail.com)
|
||||
*/
|
||||
|
||||
class TOTP {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* @module : Util module to process the datas.
|
||||
* @author : Gin (gin.lance.inside@hotmail.com)
|
||||
*/
|
||||
|
||||
class Util {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user