public class CcmMessageParameters extends java.lang.Object implements MessageParameters
Modifier and Type | Field and Description |
---|---|
protected long |
nonceGenerator |
protected byte[] |
pMAC |
protected byte[] |
pNonce |
protected long |
ulDataLen |
protected long |
ulNonceFixedBits |
Constructor and Description |
---|
CcmMessageParameters(long ulDataLen,
byte[] pNonce,
long ulNonceFixedBits,
long nonceGenerator,
byte[] pMAC)
Create a new CcmMessageParameters object with the given attributes.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Create a (deep) clone of this object.
|
boolean |
equals(java.lang.Object otherObject)
Compares all member variables of this object with the other object.
|
java.lang.Object |
getPKCS11ParamsObject()
Get this parameters object as an object of the CK_ECDH1_DERIVE_PARAMS class.
|
byte[] |
getpMAC() |
byte[] |
getpNonce() |
long |
getUlDataLen() |
int |
hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a
hashtable.
|
void |
setValuesFromPKCS11Object(java.lang.Object obj)
Read the parameters from the PKCS11Object and overwrite the values into this object.
|
java.lang.String |
toString()
Returns the string representation of this object.
|
protected long ulDataLen
protected byte[] pNonce
protected long ulNonceFixedBits
protected long nonceGenerator
protected byte[] pMAC
public CcmMessageParameters(long ulDataLen, byte[] pNonce, long ulNonceFixedBits, long nonceGenerator, byte[] pMAC)
ulDataLen
- length of the data where 0 ≤ ulDataLen < 2^(8L).pNonce
- the nonce. length: 7 ≤ ulNonceLen ≤ 13.ulNonceFixedBits
- number of bits of the original nonce to preserve when generating a nonceGenerator
- Function used to generate a new nonce. Each nonce must be
unique for a given session.pMAC
- CCM MAC returned on MessageEncrypt, provided on MessageDecryptpublic java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.Object getPKCS11ParamsObject()
getPKCS11ParamsObject
in interface Parameters
public void setValuesFromPKCS11Object(java.lang.Object obj)
setValuesFromPKCS11Object
in interface MessageParameters
obj
- Object to read the parameters frompublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
otherObject
- The other object to compare to.public int hashCode()
hashCode
in class java.lang.Object
public byte[] getpMAC()
public long getUlDataLen()
public byte[] getpNonce()
IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. version 1.6.9