Cryptography API

Symmetric/asymmetric encryption, hashing, password salting, and message verification via cryptography library.

Lord1Egypt Updated 2 repo stars

File contents

Cryptography Api

Overview

Cryptography is a package which provides cryptographic recipes and primitives to Python developers.

When to Use This Skill

Use to secure sensitive passwords, encrypt files, or verify integrity signatures locally.

Quick Start (with runnable code examples)

from cryptography.fernet import Fernet

# Generate key and encrypt
key = Fernet.generate_key()
f = Fernet(key)
token = f.encrypt(b"Secret payload message")
print("Encrypted:", token)

# Decrypt
decrypted = f.decrypt(token)
print("Decrypted:", decrypted)

Advanced Usage

Implement RSA public/private key pairs, PBKDF2 password derivation hashing, and AES-GCM primitives.

Key References

Dependencies

  • cryptography>=41.0.0

Lord1Egypt/ai-skillforge/tree/main/skills/gemini/cryptography-api commit 87499bfa65

Frequently asked questions

npx skillmds@latest add lord1egypt/cryptography-api