程序包 cn.benma666.sm

类 SM4

java.lang.Object
cn.benma666.sm.SM4

public class SM4 extends Object
与DES对应的国产对称加密算法
date: 2021年9月12日
版本:
作者:
jingma
  • 构造器详细资料

    • SM4

      public SM4()
  • 方法详细资料

    • main

      public static void main(String[] args) throws IOException
      抛出:
      IOException
    • decryptDataToString_CBC

      public String decryptDataToString_CBC(String cipherText)
    • decryptDataToString_CBC

      public String decryptDataToString_CBC(String cipherText, String charset)
    • decryptData_CBC

      public byte[] decryptData_CBC(String cipherText)
    • decryptDataToString_CBC

      public String decryptDataToString_CBC(byte[] bytes)
    • decryptData_ECB

      public byte[] decryptData_ECB(byte[] bytes)
    • decryptData_ECB

      public byte[] decryptData_ECB(String cipherText)
    • decryptDataToString_ECB

      public String decryptDataToString_ECB(String cipherText)
    • decryptDataToString_ECB

      public String decryptDataToString_ECB(String cipherText, String charset)
    • encryptDataToString_CBC

      public String encryptDataToString_CBC(byte[] bytes)
    • encryptDataToString_CBC

      public String encryptDataToString_CBC(String plainText)
    • encryptDataToString_CBC

      public String encryptDataToString_CBC(String plainText, String charset)
    • encryptData_CBC

      public byte[] encryptData_CBC(String plainText, String charset)
    • encryptData_CBC

      public byte[] encryptData_CBC(byte[] bytes)
    • encryptData_ECB

      public byte[] encryptData_ECB(byte[] bytes)
    • encryptData_ECB

      public byte[] encryptData_ECB(File f) throws IOException
      抛出:
      IOException
    • encryptData_ECB

      public byte[] encryptData_ECB(String plainText)
    • encryptData_ECB

      public byte[] encryptData_ECB(String plainText, String charset)
    • encryptDataToString_ECB

      public String encryptDataToString_ECB(String plainText)
    • encryptDataToString_ECB

      public String encryptDataToString_ECB(String plainText, String charset)
    • getIv

      public String getIv()
      返回:
      the iv
    • getSecretKey

      public String getSecretKey()
      返回:
      the secretKey
    • isHexString

      public boolean isHexString()
      返回:
      the hexString
    • setHexString

      public void setHexString(boolean hexString)
      参数:
      hexString - the hexString to set
    • setIv

      public void setIv(String iv)
      参数:
      iv - the iv to set
    • setSecretKey

      public void setSecretKey(String secretKey)
      参数:
      secretKey - the secretKey to set