pydoc > nacl

📛 NAME

nacl

🚀 Quick Reference

Use Case Command Description
🔑 Generate a secret key nacl.secret.SecretBox.generate() Create a random key for symmetric encryption
🔒 Encrypt a message nacl.secret.SecretBox(key).encrypt(message) Encrypt using secret key (XSalsa20-Poly1305)
🔓 Decrypt a message nacl.secret.SecretBox(key).decrypt(ciphertext) Decrypt a previously encrypted message
👤 Generate a keypair nacl.public.PrivateKey.generate() Create a new curve25519 keypair for asymmetric encryption
📨 Encrypt with public key nacl.public.Box(sk, pk).encrypt(message) Encrypt a message using a shared secret derived from keys
✍️ Sign a message nacl.signing.SigningKey.generate().sign(message) Create a digital signature for a message
🔍 Verify a signature nacl.signing.VerifyKey(public_bytes).verify(signed) Check the authenticity of a signed message
🔑 Password-based key derivation nacl.pwhash.str(password) Hash a password for storage (Argon2id)
🔑 Verify password hash nacl.pwhash.verify(hash, password) Check a password against a stored hash
🔢 Hash a value nacl.hash.sha256(data) Compute a SHA-256 digest

📝 DESCRIPTION

This is the nacl package – Python bindings for the Networking and Cryptography (NaCl) library.

# Copyright 2013 Donald Stufft and individual contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

📦 PACKAGE CONTENTS

📊 DATA

🔖 VERSION

1.5.0

👤 AUTHOR

The PyNaCl developers

📁 FILE

/usr/lib/python3/dist-packages/nacl/__init__.py

nacl
📛 NAME 🚀 Quick Reference 📝 DESCRIPTION 📦 PACKAGE CONTENTS 📊 DATA 🔖 VERSION 👤 AUTHOR 📁 FILE

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-01 18:52 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!