@Immutable public final class CompositeKey extends Object
See RFC 7518 (JWA), section 5.2.
See draft-mcgrew-aead-aes-cbc-hmac-sha2-01
Constructor and Description |
---|
CompositeKey(SecretKey inputKey)
Creates a new composite key from the specified secret key.
|
Modifier and Type | Method and Description |
---|---|
SecretKey |
getAESKey()
Gets the extracted encryption key.
|
SecretKey |
getInputKey()
Gets the input key.
|
SecretKey |
getMACKey()
Gets the extracted MAC key.
|
int |
getTruncatedMACByteLength()
Gets the expected truncated MAC length.
|
public CompositeKey(SecretKey inputKey) throws KeyLengthException
inputKey
- The input key. Must be 256, 384 or 512 bits long.
Must not be null
.KeyLengthException
- If the input key length is not supported.public SecretKey getInputKey()
public int getTruncatedMACByteLength()
Copyright © 2020 Connect2id Ltd.. All rights reserved.