Package org.bouncycastle.jcajce
Class SecretKeyWithEncapsulation
java.lang.Object
org.bouncycastle.jcajce.SecretKeyWithEncapsulation
- All Implemented Interfaces:
Serializable,Key,SecretKey,Destroyable
Carrier class for a KEM/KTS secret key plus its encapsulation.
- See Also:
-
Field Summary
Fields inherited from interface javax.crypto.SecretKey
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionSecretKeyWithEncapsulation(SecretKey secretKey, byte[] encapsulation) Basic constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn the algorithm for the agreed secret key.byte[]Return the encapsulation that carried the key material used in creating the agreed secret key.byte[]Return the encoding of the agreed secret key.Return the format for the agreed secret key.inthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Constructor Details
-
SecretKeyWithEncapsulation
Basic constructor.- Parameters:
secretKey- the secret key that was arrived at.encapsulation- the encapsulation the key data was carried in.
-
-
Method Details
-
getAlgorithm
Return the algorithm for the agreed secret key.- Specified by:
getAlgorithmin interfaceKey- Returns:
- the secret key value.
-
getFormat
Return the format for the agreed secret key. -
getEncoded
public byte[] getEncoded()Return the encoding of the agreed secret key.- Specified by:
getEncodedin interfaceKey- 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
-
hashCode
public int hashCode()
-