Package org.bouncycastle.jcajce
Class SecretKeyWithEncapsulation
- java.lang.Object
-
- org.bouncycastle.jcajce.SecretKeyWithEncapsulation
-
- All Implemented Interfaces:
java.io.Serializable,java.security.Key,javax.crypto.SecretKey,javax.security.auth.Destroyable
public final class SecretKeyWithEncapsulation extends java.lang.Object implements javax.crypto.SecretKeyCarrier class for a KEM/KTS secret key plus its encapsulation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SecretKeyWithEncapsulation(javax.crypto.SecretKey secretKey, byte[] encapsulation)Basic constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetAlgorithm()Return the algorithm for the agreed secret key.byte[]getEncapsulation()Return the encapsulation that carried the key material used in creating the agreed secret key.byte[]getEncoded()Return the encoding of the agreed secret key.java.lang.StringgetFormat()Return the format for the agreed secret key.inthashCode()
-
-
-
Method Detail
-
getAlgorithm
public java.lang.String getAlgorithm()
Return the algorithm for the agreed secret key.- Specified by:
getAlgorithmin interfacejava.security.Key- Returns:
- the secret key value.
-
getFormat
public java.lang.String getFormat()
Return the format for the agreed secret key.- Specified by:
getFormatin interfacejava.security.Key- Returns:
- the secret key format.
-
getEncoded
public byte[] getEncoded()
Return the encoding of the agreed secret key.- Specified by:
getEncodedin interfacejava.security.Key- Returns:
- the secret key encoding.
-
getEncapsulation
public byte[] getEncapsulation()
Return the encapsulation that carried the key material used in creating the agreed secret key.- Returns:
- the encrypted encapsulation of the agreed secret key.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-