Package org.conscrypt
Enum HpkeSuite.KEM
- java.lang.Object
-
- java.lang.Enum<HpkeSuite.KEM>
-
- org.conscrypt.HpkeSuite.KEM
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<HpkeSuite.KEM>
- Enclosing class:
- HpkeSuite
public static enum HpkeSuite.KEM extends java.lang.Enum<HpkeSuite.KEM>
Key Encapsulation Mechanisms (KEMs)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DHKEM_X25519_HKDF_SHA256MLKEM_1024MLKEM_768XWING
-
Constructor Summary
Constructors Modifier Constructor Description privateKEM(int id, int nSecret, int nEnc, int nPk, int nSk)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HpkeSuite.KEMforId(int id)Returns the KEM value for a given id.intgetEncapsulatedLength()intgetId()KEM idintgetnEnc()Deprecated.intgetPrivateKeyLength()Returns The length in bytes of an encoded private key for this KEM.intgetPublicKeyLength()Returns the length in bytes of an encoded public key for this KEM.intgetSecretLength()Returns the length in bytes of a KEM shared secret produced by this KEM.static HpkeSuite.KEMvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static HpkeSuite.KEM[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DHKEM_X25519_HKDF_SHA256
public static final HpkeSuite.KEM DHKEM_X25519_HKDF_SHA256
-
MLKEM_768
public static final HpkeSuite.KEM MLKEM_768
-
MLKEM_1024
public static final HpkeSuite.KEM MLKEM_1024
-
XWING
public static final HpkeSuite.KEM XWING
-
-
Method Detail
-
values
public static HpkeSuite.KEM[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HpkeSuite.KEM c : HpkeSuite.KEM.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HpkeSuite.KEM valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getId
public int getId()
KEM id- Returns:
- kem id
- See Also:
- KEM ids
-
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.
-
-