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

WBOY
Release: 2016-06-13 13:07:02
Original
795 people have browsed it

高分跪求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”

谢谢,各位大虾。

求程序或者直发:danlan_sky@126.com

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

PHP code
PHP code function Valid(){ (用户名id*16-32)字符串连上时间与input } 
------解决方案--------------------
现成的函数不能用吗?
Copy after login
PHP code
$url = "http://wwww.adfasf.com/upload/20120304/4532524.jpg"; $encrypt = base64_encode($url); $decrypt = base64_decode($encrypt); echo "encrypt-->>".$encrypt."
"; //aHR0cDovL3d3d3cuYWRmYXNmLmNvbS91cGxvYWQvMjAxMjAzMDQvNDUzMjUyNC5qcGc= echo "decrypt-->>".$decrypt."
"; //http://wwww.adfasf.com/upload/20120304/4532524.jpg
Copy after login
Related labels:
source:php.cn
Statement of this Website
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