public class GCMCMSParameterSpec extends GCMParameterSpec
This class extends class GCMParameterSpec
to
may be used for CMS when the mac value is not available at the time
when creating the parameter specification and therefore maybe to be
set
later.
AlgorithmParameterSpec
Constructor and Description |
---|
GCMCMSParameterSpec()
Creates a GCM Parameter specification with default values.
|
GCMCMSParameterSpec(byte[] aaData,
byte[] nonce)
Creates a GCM Parameter specification with the given additional data and
nonce.
|
GCMCMSParameterSpec(byte[] aaData,
byte[] nonce,
byte[] macBlock)
Creates a GCM Parameter specification with the given additional data, nonce
and MAC block.
|
GCMCMSParameterSpec(byte[] aaData,
byte[] nonce,
int macLen)
Creates a GCM Parameter specification with the given additional data, nonce
and MAC length.
|
Modifier and Type | Method and Description |
---|---|
void |
setMac(byte[] mac)
Sets the mac value.
|
getAAD, getMac, getMacLength, getNonce, setMacLength
public GCMCMSParameterSpec(byte[] aaData, byte[] nonce, int macLen) throws java.security.InvalidAlgorithmParameterException
aaData
- the additional data that is authenticatednonce
- bytes used to generate the IVmacLen
- number of bytes used as MACjava.security.InvalidAlgorithmParameterException
public GCMCMSParameterSpec(byte[] aaData, byte[] nonce, byte[] macBlock) throws java.security.InvalidAlgorithmParameterException
set
later.aaData
- the additional data that is authenticatednonce
- bytes used to generate the IVmacBlock
- the MAC block used to verify authenticityjava.security.InvalidAlgorithmParameterException
public GCMCMSParameterSpec(byte[] aaData, byte[] nonce) throws java.security.InvalidAlgorithmParameterException
aaData
- the additional data that is authenticatednonce
- bytes used to generate the IVjava.security.InvalidAlgorithmParameterException
public GCMCMSParameterSpec() throws java.security.InvalidAlgorithmParameterException
java.security.InvalidAlgorithmParameterException