类 CodeCryptUtils
java.lang.Object
com.abasecode.opencode.base.safe.util.CodeCryptUtils
- 作者:
- Jon e-mail: ijonso123@gmail.com url: Jon's blog url: project github url: AbaseCode.com
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static com.abasecode.opencode.base.code.CodeResultdecryptData(SafeResult result, String key, String iv) decrypt SafeResult to CodeResultdecryptString2Map(String data, String key, String iv) decrypt string 2 mapprivate static Stringencrypt map 2 stringstatic SafeResultencryptData(com.abasecode.opencode.base.code.CodeResult result, String key, String iv, String secret) encrypt CodeResult 2 SafeResultstatic Stringget md5static Stringget sha1static Stringget signstatic booleansignVerify(String sign, String data, String key, String iv) verify sign
-
构造器详细资料
-
CodeCryptUtils
public CodeCryptUtils()
-
-
方法详细资料
-
encrypt2String
private static String encrypt2String(Map<String, Object> map, String key, String iv) throws Exceptionencrypt map 2 string- 参数:
map-key-iv-- 返回:
- result
- 抛出:
Exception
-
decryptString2Map
private static Map<String,Object> decryptString2Map(String data, String key, String iv) throws Exception decrypt string 2 map- 参数:
data-key-iv-- 返回:
- result
- 抛出:
Exception
-
decryptData
public static com.abasecode.opencode.base.code.CodeResult decryptData(SafeResult result, String key, String iv) throws Exception decrypt SafeResult to CodeResult- 参数:
result-key-iv-- 返回:
- result
- 抛出:
Exception
-
encryptData
public static SafeResult encryptData(com.abasecode.opencode.base.code.CodeResult result, String key, String iv, String secret) throws Exception encrypt CodeResult 2 SafeResult- 参数:
result-key-iv-secret-- 返回:
- result
- 抛出:
Exception
-
sign
get sign- 参数:
data-secret-- 返回:
- result
- 抛出:
NoSuchAlgorithmException
-
signVerify
verify sign- 参数:
sign-data-key-iv-- 返回:
- result
- 抛出:
Exception
-
getSha
get sha1- 参数:
txt-- 返回:
- result
- 抛出:
NoSuchAlgorithmException
-
getMd5
get md5- 参数:
txt-- 返回:
- result
- 抛出:
NoSuchAlgorithmException
-