Class AesGcmAdapter
java.lang.Object
com.gigaspaces.client.storage_adapters.PropertyStorageAdapter
com.gigaspaces.client.storage_adapters.AbstractAesAdapter
com.gigaspaces.client.storage_adapters.AesGcmAdapter
Adapter for encrypting properties using AES/GCM.
Based on https://proandroiddev.com/security-best-practices-symmetric-encryption-with-aes-in-java-7616beaaade9
- Since:
- 15.2
- Author:
- Niv Ingberg
-
Field Summary
Fields inherited from class com.gigaspaces.client.storage_adapters.AbstractAesAdapter
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intProvides the initialization vector length, in bytes.protected booleanMac is not required for AES/GCM.protected intprotected StringProvides the cipher transformation string.protected AlgorithmParameterSpectoParameterSpec(byte[] iv) Methods inherited from class com.gigaspaces.client.storage_adapters.AbstractAesAdapter
cipher, decrypt, encrypt, fromSpace, generateInitializationVector, generateMac, generateSubKey, generateSubKey, getName, getOrCreateCipher, getOrCreateMac, getPassPhrase, getSecureRandom, getStorageClass, initEncryptionAlgorithm, initEncryptionKeyLength, initMacAlgorithm, initMacKeyLength, initSecureRandom, readArrayRemaining, readArrayWithByteLength, toSpace, writeArrayRemaining, writeArrayWithByteLengthMethods inherited from class com.gigaspaces.client.storage_adapters.PropertyStorageAdapter
base64Decode, base64Encode, deserialize, serialize, supportsEqualsMatching, supportsOrderedMatching, toBinaryWrapper, unwrapBinary, unzip, useBase64Wrapper, wrapBinary, zip
-
Constructor Details
-
AesGcmAdapter
public AesGcmAdapter()
-
-
Method Details
-
initTagLengthBit
protected int initTagLengthBit() -
initTransformation
Description copied from class:AbstractAesAdapterProvides the cipher transformation string.- Specified by:
initTransformationin classAbstractAesAdapter
-
initIvLengthBytes
protected int initIvLengthBytes()Description copied from class:AbstractAesAdapterProvides the initialization vector length, in bytes.- Specified by:
initIvLengthBytesin classAbstractAesAdapter
-
initMacEnabled
protected boolean initMacEnabled()Mac is not required for AES/GCM.- Specified by:
initMacEnabledin classAbstractAesAdapter
-
toParameterSpec
- Overrides:
toParameterSpecin classAbstractAesAdapter
-