com.github.sd4324530.fastweixin.message.aes
类 SHA1
java.lang.Object
com.github.sd4324530.fastweixin.message.aes.SHA1
public class SHA1
- extends Object
SHA1 class
计算公众平台的消息签名接口.
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHA1
public SHA1()
getSHA1
public static String getSHA1(String token,
String timestamp,
String nonce,
String encrypt)
throws AesException
- 用SHA1算法生成安全签名
- 参数:
token - 票据timestamp - 时间戳nonce - 随机字符串encrypt - 密文
- 返回:
- 安全签名
- 抛出:
AesException - AES算法异常
getSHA1HexString
public static String getSHA1HexString(String str)
throws Exception
- 抛出:
Exception
Copyright © 2017. All rights reserved.