Class SharedSecretKey
java.lang.Object
com.exceptionfactory.jagged.framework.crypto.MacKey
com.exceptionfactory.jagged.framework.crypto.SharedSecretKey
- All Implemented Interfaces:
Serializable,Key,SecretKey,Destroyable
Shared Secret Key extension of Cryptographic Algorithm Key containing the results of key agreement processing
- See Also:
-
Field Summary
Fields inherited from interface javax.crypto.SecretKey
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionSharedSecretKey(byte[] key) Shared Secret Key constructor with required symmetric key -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroy Key so that it cannot be used for subsequent operationsGet Cryptographic Algorithm for which the key will be usedbyte[]Get encoded key bytesGet Key format returns RAW indicating encoded key contains raw bytesbooleanReturn destroyed status
-
Constructor Details
-
SharedSecretKey
public SharedSecretKey(byte[] key) Shared Secret Key constructor with required symmetric key- Parameters:
key- Symmetric Key consisting of 32 bytes
-
-
Method Details
-
getAlgorithm
Get Cryptographic Algorithm for which the key will be used- Specified by:
getAlgorithmin interfaceKey- Returns:
- Cryptographic Algorithm
-
getFormat
Get Key format returns RAW indicating encoded key contains raw bytes -
getEncoded
public byte[] getEncoded()Get encoded key bytes- Specified by:
getEncodedin interfaceKey- Returns:
- Encoded Key byte array
-
destroy
public void destroy()Destroy Key so that it cannot be used for subsequent operations- Specified by:
destroyin interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()Return destroyed status- Specified by:
isDestroyedin interfaceDestroyable- Returns:
- Key destroyed status
-