From f99b1e514ab8a8f55fb958734421a17a100632a8 Mon Sep 17 00:00:00 2001 From: Donald Stufft <donald@stufft.io> Date: Sun, 10 Mar 2013 21:48:54 -0400 Subject: [PATCH] Use nacl.secret.SecretBox.NONCE_SIZE instead of a hardcoded 24 --- docs/secret.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/secret.rst b/docs/secret.rst index 14c5f3a7..fa2f65b7 100644 --- a/docs/secret.rst +++ b/docs/secret.rst @@ -31,7 +31,7 @@ Example # This is a nonce, it *MUST* only be used once, but it is not considered # secret and can be transmitted or stored alongside the ciphertext. A # good source of nonce is just 24 random bytes. - nonce = nacl.random(24) + nonce = nacl.random(nacl.secret.SecretBox.NONCE_SIZE) # Encrypt our message, it will be exactly 16 bytes longer than the original # message as it stores authentication information alongside it. -- GitLab