首页 新闻 会员 周边

一句php加密字符串的代码,请问能否用批处理实现

0
悬赏园豆:5 [已关闭问题] 关闭于 2014-09-02 20:11
Signature=urlencode(base64_encode(hash_hmac('sha1', Content, SecretKey,true)))

Content是多行字符串。
一羽赐命的主页 一羽赐命 | 初学一级 | 园豆:11
提问于:2014-04-20 21:06
< >
分享
所有回答(1)
0

http://cn2.php.net/manual/en/function.hash-hmac.php

楼上好幽默

 

这个问题应该不难

<?php

$Content = $argv[1];

$SecretKey = $argv[2];

$Signature = urlencode(base64_encode(hash_hmac('sha1', Content, SecretKey,true)));

?>

保存成xxx.php文件,然后在批处理shell中写

php xxx.php 你的待加密content 加密的key

....

 

简单写一下,你应该明白我的意思

郑瀚Andrew | 园豆:292 (菜鸟二级) | 2014-04-21 14:08

楼上是很幽默。。。。你也很幽默。。。

支持(0) 反对(0) 初_九 | 园豆:200 (初学一级) | 2014-06-19 13:58

@初_九: .................你是来搞笑的?

支持(0) 反对(0) 郑瀚Andrew | 园豆:292 (菜鸟二级) | 2014-10-13 20:25
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册