Enum HpkeSuite.KEM

java.lang.Object
java.lang.Enum<HpkeSuite.KEM>
org.conscrypt.HpkeSuite.KEM
All Implemented Interfaces:
Serializable, Comparable<HpkeSuite.KEM>, java.lang.constant.Constable
Enclosing class:
HpkeSuite

public static enum HpkeSuite.KEM extends Enum<HpkeSuite.KEM>
Key Encapsulation Mechanisms (KEMs)
See Also:
  • Enum Constant Details

  • Field Details

    • id

      private final int id
    • nSecret

      private final int nSecret
    • nEnc

      private final int nEnc
    • nPk

      private final int nPk
    • nSk

      private final int nSk
  • Constructor Details

    • KEM

      private KEM(int id, int nSecret, int nEnc, int nPk, int nSk)
  • Method Details

    • values

      public static HpkeSuite.KEM[] 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 HpkeSuite.KEM 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
    • getId

      public int getId()
      KEM id
      Returns:
      kem id
      See Also:
    • getnEnc

      @Deprecated public int getnEnc()
      Deprecated.
      Returns the length in bytes of an encapsulated key produced by this KEM.
    • getEncapsulatedLength

      public int getEncapsulatedLength()
    • getSecretLength

      public int getSecretLength()
      Returns the length in bytes of a KEM shared secret produced by this KEM.
    • getPublicKeyLength

      public int getPublicKeyLength()
      Returns the length in bytes of an encoded public key for this KEM.
    • getPrivateKeyLength

      public int getPrivateKeyLength()
      Returns The length in bytes of an encoded private key for this KEM.
    • forId

      public static HpkeSuite.KEM forId(int id)
      Returns the KEM value for a given id.