<script type="text/javascript" src="../js/sha1.js"></script>
<script type="text/ecmascript" src="../js/base64.js"></script>
<script type="text/javascript">
var b = new Base64();
var str = b.encode("955db8bb4dc50ca04087176973211080ad464b1c")
//var str = b.encode(hex_sha1('a123456?')) 或者这个,
alert(str)
为何我的js代码都输出下面这个啊?我前台要sha1、base64后传给后台,这个不对啊,谢谢
“OTU1ZGI4YmI0ZGM1MGNhMDQwODcxNzY5NzMyMTEwODBhZDQ2NGIxYw==”
【 在 SoulMelody 的大作中提到: 】
: In [1]: from binascii import a2b_hex
: In [2]: from base64 import b64encode
: In [3]: b64encode(a2b_hex('955db8bb4dc50ca04087176973211080ad464b1c'))
: ...................
--
FROM 114.99.186.*