如何解密SHA-256加密的字符串? [英] How to decrypt a SHA-256 encrypted string?

查看:257
本文介绍了如何解密SHA-256加密的字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个盐腌的字符串,用SHA-256进行哈希处理,然后进行base64编码.有没有办法将此字符串解码回其原始值?

I have a string that was salted, hashed with SHA-256, then base64 encoded. Is there a way to decode this string back to its original value?

推荐答案

SHA-256 加密(单向)哈希函数,因此没有直接的方法对其进行解码.加密散列函数的全部目的是您不能撤消它.

SHA-256 is a cryptographic (one-way) hash function, so there is no direct way to decode it. The entire purpose of a cryptographic hash function is that you can't undo it.

您可以做的一件事是强力策略,您可以在其中猜测哈希值是什么,然后使用相同的函数对其进行哈希处理,看看是否匹配.除非很容易猜测散列数据,否则可能要花很长的时间.

One thing you can do is a brute-force strategy, where you guess what was hashed, then hash it with the same function and see if it matches. Unless the hashed data is very easy to guess, it could take a long time though.

您可能会发现问题"哈希密码与加密之间的区别"很有趣.

You may find the question "Difference between hashing a password and encrypting it" interesting.

这篇关于如何解密SHA-256加密的字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆