Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
f99b1e51
Commit
f99b1e51
authored
12 years ago
by
Donald Stufft
Browse files
Options
Downloads
Patches
Plain Diff
Use nacl.secret.SecretBox.NONCE_SIZE instead of a hardcoded 24
parent
763eecb6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/secret.rst
+1
-1
1 addition, 1 deletion
docs/secret.rst
with
1 addition
and
1 deletion
docs/secret.rst
+
1
−
1
View file @
f99b1e51
...
@@ -31,7 +31,7 @@ Example
...
@@ -31,7 +31,7 @@ Example
# This is a nonce, it *MUST* only be used once, but it is not considered
# 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
# secret and can be transmitted or stored alongside the ciphertext. A
# good source of nonce is just 24 random bytes.
# 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
# Encrypt our message, it will be exactly 16 bytes longer than the original
# message as it stores authentication information alongside it.
# message as it stores authentication information alongside it.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment