Package cn.gmkit.core

Enum SM4CipherMode

java.lang.Object
java.lang.Enum<SM4CipherMode>
cn.gmkit.core.SM4CipherMode
All Implemented Interfaces:
Serializable, Comparable<SM4CipherMode>, java.lang.constant.Constable

public enum SM4CipherMode extends Enum<SM4CipherMode>
SM4 工作模式。
  • Enum Constant Details

    • ECB

      public static final SM4CipherMode ECB
      电子密码本模式(Electronic Codebook)
    • CBC

      public static final SM4CipherMode CBC
      密码分组链接模式(Cipher Block Chaining)
    • CTR

      public static final SM4CipherMode CTR
      计数器模式(Counter)
    • CFB

      public static final SM4CipherMode CFB
      密文反馈模式(Cipher Feedback)
    • OFB

      public static final SM4CipherMode OFB
      输出反馈模式(Output Feedback)
    • GCM

      public static final SM4CipherMode GCM
      伽罗瓦/计数器模式(Galois/Counter Mode)
    • CCM

      public static final SM4CipherMode CCM
      计数器与CBC-MAC模式(Counter with CBC-MAC)
  • Method Details

    • values

      public static SM4CipherMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SM4CipherMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isStreamLike

      public boolean isStreamLike()
      判断当前模式是否表现为流式模式。
      Returns:
      流式模式返回 true