mirror of
https://github.com/LanceGin/jsotp.git
synced 2026-05-24 00:00:05 +08:00
upd: Base32 class and base32 test
This commit is contained in:
+15
-4
@@ -4,12 +4,23 @@
|
||||
* @author : Gin (gin.lance.inside@hotmail.com)
|
||||
*/
|
||||
|
||||
export class Base32 {
|
||||
static decode() {
|
||||
return "static Base32.decode";
|
||||
const nibbler = require("./nibbler/nibbler");
|
||||
|
||||
export class Base32 {
|
||||
/**
|
||||
* Base32 decode function
|
||||
*
|
||||
* @param {secret}
|
||||
* @type {String}
|
||||
* @desc input string
|
||||
*
|
||||
* @return {String}
|
||||
*/
|
||||
static decode(secret) {
|
||||
return nibbler.b32decode(secret);
|
||||
}
|
||||
|
||||
static random_gen() {
|
||||
return "static Base32.random_gen";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user