创建可逆哈希的好方法/函数是什么?
我需要通过线路传输一些数据,但我不希望该数据是纯文本。
我发送的文本需要反转,所以我不能 md5/sha256/etc... 对
加盐字符串进行编码的好方法是什么?
I need to transmit some data over the wire and I don't want that data being plain text.
The text I'm sending needs to be reversed so I can't md5/sha256/etc...
What's a good way to encode a salted string?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您正在寻找加密。
您使用什么语言?您可能有可以使用的内置加密算法。
散列的想法是你只能单向。
而加密的想法是,您可以使用密钥和一些明文来创建密文。然后,您可以随时使用密文上的密钥来检索明文:
给定加密算法的解密算法通常与加密算法非常相似,并且它允许在给定密文和正确的情况下检索明文消息密钥(即密码)。
You're looking for encryption.
What language are you using? You probably have a built-in encryption algorithm you can use.
The idea with hashing is that you can only go one-way.
Whereas the idea with encryption is that you can use a key together with some plaintext to create a ciphertext. Then you can use the key on the ciphertext to retrieve the plaintext at any time:
The decryption algorithm for a given encryption algorithm is usually very similar to the encryption algorithm, and it allows for the retrieval of a plaintext message given a ciphertext and the correct key (ie password).
您想要使用加密函数,而不是散列 - 根据定义,散列是单向的。
AES 加密算法将是一个好的开始,因为它可能是最广泛使用的加密算法展示。
You want to use an encryption function, not a hash - which by definition is one-way.
The AES encryption algorithm would be a good start, as the is probably the most widely used one at present.
你不需要哈希值,你需要加密。您应该查看Blowfish。
You don't want a hash, you want encryption. You should look at Blowfish.