symmetric encryption(a, algorithm b, key c, charset d, [iv e])
Group |
Encrypts a text a converted to binary with charset d, using the hex-encoded symmetric key c and algorithm b. The result is the hex-encoded binary data. If an initial vector is needed for the encryption algorithm it can be provided as hex-encoded text with e.
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.
Description of Parameters
Parameter |
Descriptio |
a |
Text to be encrypted. |
b |
Encryption algorithm. Default: AES |
c |
Key as hex-coded text. |
d |
Charset used for the conversion from text to binary data. Default: 8859_1 |
e |
Initial vector as hex-coded text. |
Examples
Parameter a |
b |
c |
d |
e |
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 |