nonce and iv size
This commit is contained in:
		| @@ -111,8 +111,8 @@ export function create_listener(form, input, messages) { | ||||
| function encrypt_message(message, user_pubkey) { | ||||
|     let encryption_key = sending_ratchets[user_pubkey].next(); | ||||
|     let encoded_msg = (new TextEncoder()).encode(message); | ||||
|     let iv = generateRandomUint8Array(); | ||||
|     let nonce = generateRandomUint8Array(); | ||||
|     let iv = generateRandomUint8Array(12); | ||||
|     let nonce = generateRandomUint8Array(12); | ||||
|     let associated_data = concatUint8Arrays(fromHexString(user_pubkey), getRoundedUTCTime()); | ||||
|     let {cipher, tag} = keccakAEAD.encrypt(encryption_key, encoded_msg, iv, associated_data, nonce); | ||||
|     return {cipher: toHexString(cipher), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user