程序包 cn.benma666.sm
类 SM4
java.lang.Object
cn.benma666.sm.SM4
与DES对应的国产对称加密算法
date: 2021年9月12日
date: 2021年9月12日
- 版本:
- 作者:
- jingma
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明byte[]decryptData_CBC(String cipherText) byte[]decryptData_ECB(byte[] bytes) byte[]decryptData_ECB(String cipherText) decryptDataToString_CBC(byte[] bytes) decryptDataToString_CBC(String cipherText) decryptDataToString_CBC(String cipherText, String charset) decryptDataToString_ECB(String cipherText) decryptDataToString_ECB(String cipherText, String charset) byte[]encryptData_CBC(byte[] bytes) byte[]encryptData_CBC(String plainText, String charset) byte[]encryptData_ECB(byte[] bytes) byte[]byte[]encryptData_ECB(String plainText) byte[]encryptData_ECB(String plainText, String charset) encryptDataToString_CBC(byte[] bytes) encryptDataToString_CBC(String plainText) encryptDataToString_CBC(String plainText, String charset) encryptDataToString_ECB(String plainText) encryptDataToString_ECB(String plainText, String charset) getIv()booleanstatic voidvoidsetHexString(boolean hexString) voidvoidsetSecretKey(String secretKey)
-
构造器详细资料
-
SM4
public SM4()
-
-
方法详细资料
-
main
- 抛出:
IOException
-
decryptDataToString_CBC
-
decryptDataToString_CBC
-
decryptData_CBC
-
decryptDataToString_CBC
-
decryptData_ECB
public byte[] decryptData_ECB(byte[] bytes) -
decryptData_ECB
-
decryptDataToString_ECB
-
decryptDataToString_ECB
-
encryptDataToString_CBC
-
encryptDataToString_CBC
-
encryptDataToString_CBC
-
encryptData_CBC
-
encryptData_CBC
public byte[] encryptData_CBC(byte[] bytes) -
encryptData_ECB
public byte[] encryptData_ECB(byte[] bytes) -
encryptData_ECB
- 抛出:
IOException
-
encryptData_ECB
-
encryptData_ECB
-
encryptDataToString_ECB
-
encryptDataToString_ECB
-
getIv
- 返回:
- the iv
-
getSecretKey
- 返回:
- the secretKey
-
isHexString
public boolean isHexString()- 返回:
- the hexString
-
setHexString
public void setHexString(boolean hexString) - 参数:
hexString- the hexString to set
-
setIv
- 参数:
iv- the iv to set
-
setSecretKey
- 参数:
secretKey- the secretKey to set
-