Fernet Encryption
Symmetric encryption with authentication using the Fernet specification. Compatible with Python's cryptography library for secure data encryption.
Generate Fernet Key
Generate a 32-byte (256-bit) URL-safe base64-encoded key for Fernet encryption.
Generated Key
Operation
Encrypt Data
Decrypt Data
Result
About Fernet
Fernet is a symmetric encryption specification that provides both confidentiality and authenticity guarantees. It uses AES-128-CBC for encryption and HMAC-SHA256 for authentication, with built-in timestamp support.
Features
- Authenticated: HMAC prevents tampering
- Timestamped: Optional token expiration (TTL)
- Symmetric: Same key for encrypt/decrypt
- URL-Safe: Base64url encoding
Use Cases
- API Tokens: Time-limited authentication tokens
- Session Data: Secure session storage
- File Encryption: Encrypt files and documents
- Database Fields: Encrypt sensitive DB columns
cryptography.fernet module. You can encrypt here and decrypt in Python, or vice versa.
Feedback
Help us improve this page by providing feedback:
Sending...
Feedback sent. Thank you!
Error occurred!