There are needs of wanting to encrypt and to manage individual information and the sensitive information safely. The encryption function is supported in Slim3, and supported encryption algorithm and field type are as follows:
Example of defining Model as follows:
Example of setting cipher key as follows:
The cipher key set with setLimitedCipherKey is maintained on ThreadLocal and used for the encryption and the decryption by a current thread. FrontController clears the cipher key on a current thread, and calls each controller afterwards. This method assumes the case where a cipher key different by each Controller is used. The cipher key set with setGlobalCipherKey is maintained in the static area, and used by all threads. FrontController doesn't clear the value set with setGlobalCipherKey. This method assumes the case where the cipher key is used by fixation in the system. LimitedCipherKey is prior to globalCipherKey. Moreover, when the value is both unset, the exception is thrown out. Please set 128bit (16 characters) to the cipher key. It becomes the specification of AES.
You can set the globalCipherKey's value in appengine-web.xml as follows:
The encryption and the decryption are executed automatically. All in-memory filters and sorts are supported to the encryption field. The query(non in-memory) filters which are supported to the encryption field are limited. Those are as follows:
The query(non in-memory) sorts are not supported to the encryption field.
Continue to Keys and Entity Groups.