feat: changed TOTP and base32 library to self-writed special for quick-js, fixed BigInt incompatibility

This commit is contained in:
Савелий Савенок
2024-11-13 02:30:53 +03:00
parent ab13957cb0
commit f16d7374f4
14 changed files with 147 additions and 328 deletions

View File

@@ -1,4 +1,4 @@
import { TOTP } from "../../lib/totp.js/lib/totp";
import { TOTP } from "../../lib/totp-quickjs";
export class TOTPBuffer{
constructor(){
@@ -6,15 +6,6 @@ export class TOTPBuffer{
}
getTOTPs(){
return [new TOTPData("Contabo-Customer-Control-Panel-11755808: my.contabo.com", new TOTP(TOTP.encode('UU5WIIWKDNAHUNNL')).genOTP()),
new TOTPData("OTPData", new TOTP(TOTP.encode('LCHJZO23LT3Z2QYNYAYAJXH5HFDZ5YI2')).genOTP()),
new TOTPData("test", new TOTP(TOTP.encode('GAXHMZDEGJVG64LP')).genOTP())]
}
}
export class TOTPData{
constructor(name, data){
this.name = name;
this.data = data;
return [new TOTP('JBSWY3DPEHPK3PXP').getOTP()]
}
}