CryptoAES private key from Play Framework

I searched for some cryptographic functions in playframework, and in the documentation for encryptAES they say: "Encrypt the string with the AES encryption standard using the application secret."

Ok, the function looks like this, but where can I find this secret key?

Function Code Function:

public static java.lang.String encryptAES(java.lang.String value) Encrypt a String with the AES encryption standard using the application secret 

thanks

+4
source share
1 answer

It is placed in the conf/application.conf file

In both games 1.x and Play 2.x its name is application.secret

You can also use your own key using the method:

 public static java.lang.String encryptAES(java.lang.String value, java.lang.String privateKey) 

http://www.playframework.org/documentation/api/1.2/play/libs/Crypto.html#encryptAES(java.lang.String , java.lang.String)

+6
source

Source: https://habr.com/ru/post/1432109/


All Articles