feat: added support for time indicator
This commit is contained in:
@@ -13,10 +13,10 @@ export function getHOTP(counter, secret, digits = 6, hashType = 'SHA-1'){
|
||||
|
||||
//Stage 1: Prepare data
|
||||
const rawDataCounter = new DataView(new ArrayBuffer(8))
|
||||
rawDataCounter.setUint32(0, counter >> 32)
|
||||
rawDataCounter.setUint32(4, counter)
|
||||
|
||||
const bCounter = new Uint8Array(rawDataCounter.buffer)
|
||||
|
||||
console.log(bCounter)
|
||||
const bSecret = new Uint8Array(decode(secret).match(/.{1,2}/g).map(chunk => parseInt(chunk, 16))); //confirmed
|
||||
|
||||
//Stage 2: Hash data
|
||||
|
||||
Reference in New Issue
Block a user