(left: Uint8Array, right: Uint8Array)
| 58 | bytesOf(createHmac("sha256", key).update(data).digest()) |
| 59 | |
| 60 | const xor = (left: Uint8Array, right: Uint8Array): Uint8Array => { |
| 61 | const result = new Uint8Array(left.length) |
| 62 | for (let i = 0; i < left.length; i++) { |
| 63 | result[i] = left[i] ^ right[i] |
| 64 | } |
| 65 | return result |
| 66 | } |
| 67 | |
| 68 | const toBase64 = (bytes: Uint8Array): string => Base64.encode(bytes) |
| 69 |
no outgoing calls
no test coverage detected