From: Fabio Scotoni <34964387+fscoto@users.noreply.github.com> Date: Sat, 9 Jul 2022 09:07:57 +0000 (+0200) Subject: doc: crypto_sign: fix memcmp() instead of memcpy() in example X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=aa3f47863811b5c04448bc302d0810d4245b4540;p=Monocypher.git doc: crypto_sign: fix memcmp() instead of memcpy() in example --- diff --git a/doc/man/man3/crypto_sign.3monocypher b/doc/man/man3/crypto_sign.3monocypher index 8ca9b38..0640f55 100644 --- a/doc/man/man3/crypto_sign.3monocypher +++ b/doc/man/man3/crypto_sign.3monocypher @@ -208,7 +208,7 @@ uint8_t sk[64]; /* Fat secret key */ uint8_t pk[32]; /* Public key */ arc4random_buf(sk, 32); /* Secret half */ crypto_sign_public_key(sk + 32, sk); /* Public half */ -memcmp(pk, sk + 32); /* Copy public key */ +memcpy(pk, sk + 32, 32); /* Copy public key */ /* Wipe the secret key if it is no longer needed */ crypto_wipe(sk, 64); .Ed