Encrypt data with secret key or certificate loaded from keystore. Whenever required, serializer generates
random initialization vector and prepends it to the output byte array. Length of initialization vector
is dynamically calculated based on chosen cipher suite (see
EncryptionHelper.ivLength(String, Cipher)).
Example configuration (secret key):
transformation = AES/ECB/PKCS5Padding
secret = 770A8A65DA156D24EE2A093277530142
Example configuration (public key encryption):
transformation = RSA/None/PKCS1Padding
key.store.path = /tmp/keystore.jks
key.store.password = changeit
key.store.alias = key1
Output data representation:
+------------------------------------+
| initialization vector | encrypted |
| (optional, 8-16 bytes) | data |
+------------------------------------+