文本加密
所有加密都在您的浏览器中使用 Web Crypto API 本地执行。您的数据永远不会离开您的设备。
什么是文本加密?
文本加密是将可读文本(明文)转换为不可读格式(密文)以保护其机密性的过程。只有拥有正确解密密钥的人才能读取原始消息。
Supported Algorithms:
Symmetric Encryption (AES):
- AES-GCM (Recommended): Provides authenticated encryption with associated data (AEAD). Most secure for general use.
- AES-CBC: Traditional block cipher mode. Requires padding.
- AES-CTR: Counter mode. Converts block cipher to stream cipher.
Asymmetric Encryption (RSA):
- RSA-OAEP: Uses public key for encryption. Limited to ~190 characters due to key size constraints. Use for encrypting small data or symmetric keys.
Output Format:
For AES algorithms: JSON with base64-encoded components
{"iv": "base64_encoded_iv", "data": "base64_encoded_ciphertext"}
For RSA: Base64-encoded ciphertext only (no IV needed)
base64_encoded_ciphertext
This format is compatible with most encryption/decryption tools and libraries.
如何使用文本加密工具
-
在输入框中输入要加密的文本。
-
选择加密算法(AES 或 RSA)。
-
输入加密密钥或点击"生成密钥"创建一个。
-
对于 RSA:以 PEM 格式粘贴您的公钥。
-
点击“加密”按钮即可生成加密数据。
-
使用眼睛图标显示/隐藏您的密钥以确保安全。
Additional Tips:
- For AES: The secret key is auto-generated or you can provide your own (minimum 32 characters)
- For RSA: You need a public key in PEM format. Generate one using the Key Generator tool or OpenSSL
- RSA limitations: Can only encrypt short text (~190 characters). For longer texts, use AES algorithms
- Output encoding: Base64 is used for compatibility with other encryption tools and libraries
安全注意事项
此工具使用 Web Crypto API,完全在您的浏览器中运行。您的数据永远不会被发送到任何服务器。对于生产使用,请始终使用强随机密钥。
Important Notes:
- All encryption happens locally in your browser using the Web Crypto API
- The IV (Initialization Vector) is automatically generated for each encryption and must be saved with the ciphertext
- For RSA encryption, you encrypt with a public key; decryption requires the corresponding private key
- Store your secret keys securely - if lost, encrypted data cannot be recovered
- Base64 encoding makes the output portable and compatible with most tools and programming languages
这个免费的在线文本加密工具快速、安全,完全在您的浏览器中工作。所有加密都在您的浏览器中使用 Web Crypto API 本地进行。不会向任何服务器发送数据。
Keywords: 在线文本加密,AES 加密,加密文本,AES-GCM,AES-CBC,安全文本加密,免费加密