From: Loup Vaillant Date: Thu, 22 Feb 2024 14:40:50 +0000 (+0100) Subject: Doc: fix plain_text/cipher_text inversion X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=d7e86dbca82d57774a94e7b10fca8c1cffae6d41;p=Monocypher.git Doc: fix plain_text/cipher_text inversion --- diff --git a/doc/crypto_chacha20_djb.3monocypher b/doc/crypto_chacha20_djb.3monocypher index 84bcff2..b95571f 100644 --- a/doc/crypto_chacha20_djb.3monocypher +++ b/doc/crypto_chacha20_djb.3monocypher @@ -261,9 +261,9 @@ To decrypt the above: .Bd -literal -offset indent uint8_t key [ 32]; /* Same key as above */ const uint8_t nonce [ 24]; /* Same nonce as above */ -uint8_t plain_text [500]; /* Message to decrypt */ -uint8_t cipher_text[500]; /* Secret message */ -crypto_chacha20_x(cipher_text, plain_text, 500, key, nonce, 0); +uint8_t cipher_text[500]; /* Message to decrypt */ +uint8_t plain_text [500]; /* Secret message */ +crypto_chacha20_x(plain_text, cipher_text, 500, key, nonce, 0); /* Wipe secrets if they are no longer needed */ crypto_wipe(key, 32); /* The plaintext likely needs to be processed before you wipe it */