|
Cumulus4j API (1.2.0-SNAPSHOT) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.model.EncryptionCoordinateSet
public class EncryptionCoordinateSet
Encryption coordinates used to encrypt a persistent record.
Via the EncryptionCoordinateSetManager
, the CryptoManager
(or CryptoSession
) implementation can map the cipher-transformation
and other encryption-coordinates (e.g. the MAC algorithm
)
to a number in order to save space in each persistent record.
Field Summary | |
---|---|
static String |
MAC_ALGORITHM_NONE
Constant for deactivating the MAC. |
Constructor Summary | |
---|---|
protected |
EncryptionCoordinateSet()
Create a new EncryptionCoordinateSet . |
protected |
EncryptionCoordinateSet(String cipherTransformation,
String macAlgorithm)
Create a new EncryptionCoordinateSet . |
Method Summary | |
---|---|
String |
getCipherTransformation()
Get the cipher-transformation that identifies the encryption
algorithm, the mode and the padding used to encrypt a record. |
int |
getEncryptionCoordinateSetID()
Get the unique numeric identifier of this EncryptionCoordinateSet . |
String |
getMACAlgorithm()
Get the MAC-algorithm used to protect a record against corruption/manipulation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MAC_ALGORITHM_NONE
Constant for deactivating the MAC.
Important: Deactivating the MAC is dangerous! Choose this value only, if you are absolutely
sure that your cipher-transformation
already
provides authentication - like GCM
does for example.
Constructor Detail |
---|
protected EncryptionCoordinateSet()
EncryptionCoordinateSet
. This default constructor only exists
for JDO and should never be used directly!
protected EncryptionCoordinateSet(String cipherTransformation, String macAlgorithm)
EncryptionCoordinateSet
. Instead of using this constructor,
you should use #createEncryptionCoordinateSet(PersistenceManager, String, String)
!
cipherTransformation
- the cipher-transformation.macAlgorithm
- the MAC-algorithm.Method Detail |
---|
public int getEncryptionCoordinateSetID()
Get the unique numeric identifier of this EncryptionCoordinateSet
.
Note: Implementors of CryptoManager
(or CryptoSession
respectively) might
choose not to store the entire int value (4 bytes), but reduce the size. Every time the
encryption configuration is changed, a new instance of this class is persisted. Restricting
the size to 2 bytes, for example, still gives the administrator the possibility to change
the configuration 65535 times - which is likely enough.
public String getCipherTransformation()
cipher-transformation
that identifies the encryption
algorithm, the mode and the padding used to encrypt a record. The system usually passes
this value to CryptoRegistry.createCipher(String)
.
cipher-transformation
. Never null
.public String getMACAlgorithm()
Get the MAC-algorithm used to protect a record against corruption/manipulation.
Implementors of CryptoManager
/CryptoSession
should take MAC_ALGORITHM_NONE
into account! If this value equals that constant, MAC calculation and storage should be skipped.
|
Cumulus4j API (1.2.0-SNAPSHOT) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |