com.github.sd4324530.fastweixin.message.aes
类 SHA1

java.lang.Object
  继承者 com.github.sd4324530.fastweixin.message.aes.SHA1

public class SHA1
extends Object

SHA1 class 计算公众平台的消息签名接口.


构造方法摘要
SHA1()
           
 
方法摘要
static String getSHA1(String token, String timestamp, String nonce, String encrypt)
          用SHA1算法生成安全签名
static String getSHA1HexString(String str)
           
 
从类 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.