XOR-based fast fake encryption. Returns a hex-encoded "ciphertext" that can be round-tripped with mockDecrypt.
Hex-encoded 256-bit key.
UTF-8 string or bytes to encrypt.
Hex-encoded "ciphertext".
import { mockEncrypt, TEST_KEYS } from "@sebastienrousseau/crypto-testing";const ct = mockEncrypt(TEST_KEYS.aes256, "hello world"); Copy
import { mockEncrypt, TEST_KEYS } from "@sebastienrousseau/crypto-testing";const ct = mockEncrypt(TEST_KEYS.aes256, "hello world");
XOR-based fast fake encryption. Returns a hex-encoded "ciphertext" that can be round-tripped with mockDecrypt.