public final class AgreedKeyWithMacKey
extends java.lang.Object
implements javax.crypto.SecretKey
Constructor and Description |
---|
AgreedKeyWithMacKey(javax.crypto.SecretKey secretKey)
Basic constructor, no MAC.
|
AgreedKeyWithMacKey(javax.crypto.SecretKey secretKey,
java.lang.String macAlgorithm,
byte[] macKey)
Constructor containing MAC details
|
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAlgorithm()
Return the algorithm for the agreed secret key.
|
byte[] |
getEncoded()
Return the encoding of the agreed secret key.
|
java.lang.String |
getFormat()
Return the format for the agreed secret key.
|
ZeroizableSecretKey |
getMacKey()
Return a key for the MAC associated with the KTS process (if available).
|
int |
hashCode() |
boolean |
isDestroyed() |
public AgreedKeyWithMacKey(javax.crypto.SecretKey secretKey)
secretKey
- the secret key that was arrived at.public AgreedKeyWithMacKey(javax.crypto.SecretKey secretKey, java.lang.String macAlgorithm, byte[] macKey)
secretKey
- the secret key that was arrived at.macAlgorithm
- the MAC algorithm to use.macKey
- the bytes representing the agreed MAC key.public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public byte[] getEncoded()
getEncoded
in interface java.security.Key
public void destroy()
destroy
in interface javax.security.auth.Destroyable
public boolean isDestroyed()
isDestroyed
in interface javax.security.auth.Destroyable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ZeroizableSecretKey getMacKey()