Decrypt a String with the AES encryption standard.
Decrypt a String with the AES encryption standard.
The private key must have a length of 16 bytes.
The provider used is by default this uses the platform default JSSE provider. This can be overridden by defining
play.crypto.provider
in application.conf
.
The transformation used is by default AES/CTR/NoPadding
. It can be configured by defining
play.crypto.aes.transformation
in application.conf
. Although any cipher transformation algorithm can
be selected here, the secret key spec used is always AES, so only AES transformation algorithms will work.
An hexadecimal encrypted string.
The key used to encrypt.
The decrypted String.
(Since version 2.5.0) This method will be removed in future versions
Decrypt a String with the AES encryption standard using the application's secret key.
Decrypt a String with the AES encryption standard using the application's secret key.
The provider used is by default this uses the platform default JSSE provider. This can be overridden by defining
play.crypto.provider
in application.conf
.
The transformation used is by default AES/CTR/NoPadding
. It can be configured by defining
play.crypto.aes.transformation
in application.conf
. Although any cipher transformation algorithm can
be selected here, the secret key spec used is always AES, so only AES transformation algorithms will work.
An hexadecimal encrypted string.
The decrypted String.
(Since version 2.5.0) This method will be removed in future versions
Encrypt a String with the AES encryption standard and the supplied private key.
Encrypt a String with the AES encryption standard and the supplied private key.
The provider used is by default this uses the platform default JSSE provider. This can be overridden by defining
play.crypto.provider
in application.conf
.
The transformation algorithm used is the provider specific implementation of the AES
name. On Oracles JDK,
this is AES/CTR/NoPadding
. This algorithm is suitable for small amounts of data, typically less than 32
bytes, hence is useful for encrypting credit card numbers, passwords etc. For larger blocks of data, this
algorithm may expose patterns and be vulnerable to repeat attacks.
The transformation algorithm can be configured by defining play.crypto.aes.transformation
in
application.conf
. Although any cipher transformation algorithm can be selected here, the secret key spec used
is always AES, so only AES transformation algorithms will work.
The String to encrypt.
The key used to encrypt.
An hexadecimal encrypted string.
(Since version 2.5.0) This method will be removed in future versions
Encrypt a String with the AES encryption standard using the application's secret key.
Encrypt a String with the AES encryption standard using the application's secret key.
The provider used is by default this uses the platform default JSSE provider. This can be overridden by defining
play.crypto.provider
in application.conf
.
The transformation algorithm used is the provider specific implementation of the AES
name. On Oracles JDK,
this is AES/CTR/NoPadding
. This algorithm is suitable for small amounts of data, typically less than 32
bytes, hence is useful for encrypting credit card numbers, passwords etc. For larger blocks of data, this
algorithm may expose patterns and be vulnerable to repeat attacks.
The transformation algorithm can be configured by defining play.crypto.aes.transformation
in
application.conf
. Although any cipher transformation algorithm can be selected here, the secret key spec used
is always AES, so only AES transformation algorithms will work.
The String to encrypt.
An hexadecimal encrypted string.
This method is deprecated and will be removed in future versions.
Symmetric encryption using AES/CTR/NoPadding.