java.lang.Object
org.apache.wicket.pageStore.crypt.GCMSIVCrypter
- All Implemented Interfaces:
ICrypter
Encryption and decryption implementation using AES-256-GCM-SIV authenticated encryption.
This implementation requires Bouncy Castle. It is more secure than the
DefaultCrypter
,
but also more expensive. Simple measurements have shown DefaultCrypter
to be about 10 to
15 times faster than this implementation. This is likely caused by not-so-optimal implementation
of the algorithm in Java by BC. When the JDK gets support for GCM-SIV
(https://bugs.openjdk.org/browse/JDK-8256530), this implementation will likely be faster than or
about as fast as CBC.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
byte[]
encrypt
(byte[] decrypted, SecretKey key, SecureRandom random) generateKey
(SecureRandom random) protected Cipher
-
Constructor Details
-
GCMSIVCrypter
public GCMSIVCrypter()
-
-
Method Details
-
getCipher
- Throws:
GeneralSecurityException
-
generateKey
- Specified by:
generateKey
in interfaceICrypter
-
encrypt
-
decrypt
-