Module bus.crypto

Enum Class KeyType

java.lang.Object
java.lang.Enum<KeyType>
org.miaixz.bus.crypto.builtin.asymmetric.KeyType
All Implemented Interfaces:
Serializable, Comparable<KeyType>, Constable

public enum KeyType extends Enum<KeyType>
密钥类型
Since:
Java 17+
Author:
Kimi Liu
  • Enum Constant Details

    • PublicKey

      public static final KeyType PublicKey
      公钥
    • PrivateKey

      public static final KeyType PrivateKey
      私钥
    • SecretKey

      public static final KeyType SecretKey
      密钥
  • Method Details

    • values

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

      public static KeyType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      获取枚举值对应的int表示
      Returns:
      枚举值对应的int表示