Crypto Testing
    Preparing search index...

    Function createTestEncryptedMessage

    • Create a test encrypted message using mock XOR encryption.

      Parameters

      • Optionalplaintext: string

        Optional plaintext to encrypt. Defaults to the well-known test vector.

      • Optionalkey: string

        Optional hex key. Defaults to TEST_KEYS.aes256.

      Returns TestEncryptedMessage

      import { createTestEncryptedMessage } from "@sebastienrousseau/crypto-testing";

      const msg = createTestEncryptedMessage("secret data");
      console.log(msg.ciphertext); // hex-encoded XOR ciphertext