forked from andyburke/autonomous.contact
fix: clean up fixes after APP overhaul
This commit is contained in:
parent
52f46207ec
commit
c34069066d
11 changed files with 76 additions and 88 deletions
|
|
@ -7,9 +7,10 @@ import { decodeBase32 } from '@std/encoding';
|
|||
*
|
||||
* @ignore
|
||||
*/
|
||||
export function counterToBuffer(counter: number): DataView {
|
||||
const buffer = new DataView(new ArrayBuffer(8));
|
||||
buffer.setBigUint64(0, BigInt(counter), false);
|
||||
export function counterToBuffer(counter: number): ArrayBuffer {
|
||||
const buffer = new ArrayBuffer(8);
|
||||
const view = new DataView(buffer);
|
||||
view.setBigUint64(0, BigInt(counter), false);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
@ -23,7 +24,7 @@ export async function generateHmacSha1(
|
|||
): Promise<Uint8Array> {
|
||||
const importedKey = await crypto.subtle.importKey(
|
||||
'raw',
|
||||
key,
|
||||
new Uint8Array(key),
|
||||
{ name: 'HMAC', hash: 'SHA-1' },
|
||||
false,
|
||||
['sign']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue