]> git.codecow.com Git - Monocypher.git/commitdiff
Doc: fix plain_text/cipher_text inversion
authorLoup Vaillant <loup@loup-vaillant.fr>
Thu, 22 Feb 2024 14:40:50 +0000 (15:40 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Thu, 22 Feb 2024 14:40:50 +0000 (15:40 +0100)
doc/crypto_chacha20_djb.3monocypher

index 84bcff2b8cca9b0e9bad7a3f48a0f99853523116..b95571fc60fd115f5e6c54140b326e899cf93976 100644 (file)
@@ -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 */