UNPKG

miscreant

Version:

Misuse resistant symmetric encryption library providing AES-SIV (RFC 5297), AES-PMAC-SIV, and STREAM constructions

10 lines (8 loc) 269 B
// Copyright (C) 2016 Dmitry Chestnykh // MIT License. See LICENSE file for details. /** Perform an in-place bitwise XOR operation on two bytestrings */ export function xor(a: Uint8Array, b: Uint8Array) { for (let i = 0; i < b.length; i++) { a[i] ^= b[i]; } }