string token = "qdg6ek"; string timestamp = "1409659589"; string nonce = "263014780"; string echostr = "p9nazczydtytweshep1vc5x9xho/qyx3zpb4yka9skld1dsh3iyt3tp3zndtp 4rpcs8tgae7oabo fzxvnaqq=="; string verifymsgsig = "5c45ff5e21c57e6ad56bac8758b79b1d9ac89fd3"; def params = [] params.add(token) params.add(timestamp) params.add(nonce) params.add(echostr) def messagedigest = java.security.messagedigest.getinstance("sha1") messagedigest.update(params.sort().join().getbytes()) println(verifymsgsig.equals(messagedigest.digest().encodehex().tostring()))
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....