下面我用sha1加密了一个字符串变量.现在我希望使用sha1函数解密数据,但我会去一些地方.有人会挺身而出,以正确的方式指导我.
以下是我的代码
<?PHP $variable = "tiger"; echo $variable; $encrypt = sha1($variable); echo $encrypt; $decrypt = sha1($encrypt); echo $decrypt; ?>@H_404_4@我得到这样的输出
tiger 46e3d772a1888eadff26c7ada47fd7502d796e07 989df2c8b5ea37eb7cfde0527d94c01a15257002@H_404_4@
SHA-1是单向散列函数.
原文链接:https://www.f2er.com/php/136719.html根据维基百科
A cryptographic hash function is a hash function which is considered
practically impossible to invert,that is,to recreate the input data
from its hash value alone.
http://en.wikipedia.org/wiki/Cryptographic_hash_function
因此,你根本无法解密它.