文本加密
什么是文本加密?
文本加密是将可读文本(明文)转换为不可读格式(密文)以保护其机密性的过程。只有拥有正确解密密钥的人才能读取原始消息。
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 本地进行。不会向任何服务器发送数据。
常见问题
在这里解码敏感数据是否安全? 是的。所有解码都在您的浏览器中使用JavaScript进行。没有数据被传输到任何服务器,因此您的编码字符串完全保持私密。
Base64和URL安全Base64之间的区别是什么? 标准Base64使用+和/字符,这些是URL中的特殊字符。URL安全Base64将其替换为-和_,这样字符串可以在URL和文件名中安全使用,无需进行百分比编码。
为什么我解码的输出看起来像乱码? 如果原始数据是二进制文件(如图像、PDF或压缩文件),解码的输出将不是可读文本。在这种情况下,Base64字符串代表二进制文件,而不是文本字符串。
Base64是一种加密形式吗? 不是。Base64是编码方案,不是加密。任何人都可以在没有密钥的情况下解码Base64字符串。它不应该用于保护敏感数据——应使用适当的加密。
Keywords: 在线文本加密,AES 加密,加密文本,AES-GCM,AES-CBC,安全文本加密,免费加密