类 CtyunUtils
java.lang.Object
org.dromara.sms4j.ctyun.utils.CtyunUtils
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringgenerateParamJsonStr(CtyunConfig ctyunConfig, String phone, String message, String templateId) 生成请求body参数private static Stringprivate static byte[]hmacSHA256(byte[] data, byte[] key) private static String获取签名时间戳signHeader(String body, String key, String secret) 获取签名请求头private static StringtoHex(byte[] data)
-
构造器详细资料
-
CtyunUtils
public CtyunUtils()
-
-
方法详细资料
-
signatureTime
获取签名时间戳 -
signHeader
获取签名请求头 -
generateParamJsonStr
public static String generateParamJsonStr(CtyunConfig ctyunConfig, String phone, String message, String templateId) 生成请求body参数- 参数:
ctyunConfig- 配置数据phone- 手机号message- 短信内容templateId- 模板id
-
toHex
-
getSHA256
-
hmacSHA256
private static byte[] hmacSHA256(byte[] data, byte[] key)
-