symmetric encryption()
This function encrypts a text a with charset d, using the hex-encoded symmetric key c and algorithm b. The result is the encrypted data, see also parameter f.
If an initial vector is needed for the encryption algorithm, it can be provided as hex-encoded text with e.
Parameters
Parameter |
Description |
a |
Text to be encrypted. |
b |
(optional) Encryption algorithm. Default: AES. Note: Use the three dots to select a value. Note: If no mode and padding are specified, the JVM default will be used, which might change in a future version. The specification of the complete algorithm is suggested. |
c |
Key as hex-encoded text. |
d |
(optional) Charset used for the conversion from text a to binary data. Default: 8859_1. Note: Use the three dots to select a value. |
e |
(optional) Initial vector as hex-encoded text. |
f |
(optional) The format of the return value. Allowed values: hex, base64, raw. Default: hex |
Examples
Parameter a |
b |
c |
d |
e |
f |
Result |
täst€ |
|
010203040506070809000a0b0c0d0e0f |
|
|
|
5720cacf806b4feccfd1d4baf7b4e036 |
täst€ |
|
010203040506070809000a0b0c0d0e0f |
uft8 |
|
|
bfa536255e3055e5c3342eebb509eee3 |
täst€ |
AES/ECB/PKCS5Padding |
010203040506070809000a0b0c0d0e0f |
uft8 |
|
|
bfa536255e3055e5c3342eebb509eee3 |
täst€ |
DESEDE/ECB/PKCS5Padding |
010203040506070809000a0b0c0d0e0f |
8859_15 |
|
|
64f2e3f139eb65be |