move keccak related functions to front end
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { genKeys, sharedKey } from "./ecdh.js";
|
||||
import { keccakAEAD } from "./aead.js";
|
||||
import { keccakKDF } from "./kdf.js";
|
||||
|
||||
const socket = io();
|
||||
let secret = null;
|
||||
@@ -47,7 +49,7 @@ export function create_listener(form, input) {
|
||||
}
|
||||
|
||||
const fromHexString = (hexString) =>
|
||||
Uint8Array.from(hexString.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)));
|
||||
Uint8Array.from(hexString.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)));
|
||||
|
||||
const toHexString = (bytes) =>
|
||||
bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
|
||||
bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
|
||||
|
||||
Reference in New Issue
Block a user