Home  >  Article  >  Backend Development  >  高分跪求ASP/PHP字符串加密解密可能字符串base64

高分跪求ASP/PHP字符串加密解密可能字符串base64

WBOY
WBOYOriginal
2016-06-13 10:57:39815browse

高分跪求ASP/PHP字符串加密解密或者字符串base64
例如:
原始URL字符串:http://wwww.adfasf.com/upload/20120304/4532524.jpg
我需要将这个字符串加密成:一个很短的字符串,大小写字母+数字或者单独数字或者字母都地。

例:“http://wwww.adfasf.com/upload/20120304/4532524.jpg”=加密后的"afadasfwetqetqwetfasdf"
同时需要解密程序:当我获取到“afadasfwetqetqwetfasdf”时,我通过解密程序得到原始的字符串。

例:"afadasfwetqetqwetfasdf"=解密后“http://wwww.adfasf.com/upload/20120304/4532524.jpg”

谢谢,各位大虾。

求程序或者直发:[email protected]

------解决方案--------------------
好汉,你自己写个密码算法即可。
这是这样做的,

PHP code
PHP codefunction Valid(){(用户名id*16-32)字符串连上时间与input}<br><font color="#e78608">------解决方案--------------------</font><br>现成的函数不能用吗?<br>
PHP code
$url = "http://wwww.adfasf.com/upload/20120304/4532524.jpg";$encrypt = base64_encode($url);$decrypt = base64_decode($encrypt);echo "encrypt-->>".$encrypt."<br>";//aHR0cDovL3d3d3cuYWRmYXNmLmNvbS91cGxvYWQvMjAxMjAzMDQvNDUzMjUyNC5qcGc=echo "decrypt-->>".$decrypt."<br>";//http://wwww.adfasf.com/upload/20120304/4532524.jpg<div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn