Two goals.
1. Move encryption/decryption implementation to `interfaces` module.
Today, only the interfaces are in `interfaces` module, not the
implementations. We need the implementation also to be in `interfaces`.
We need this for solving encryption/decryption in the `pg` branch.
2. Make the encryption and decryption functions be static, and not
depend on Spring's DI system. We need this to be available _before_
Spring's DI kicks in, during runtime annotation processing by Hibernate,
so we need it to be just static functions, and not depend on Spring
havin initialized.
This also means that we have to read the env variables directly. The
`application.properties` is loaded by Spring, and since we want this
information before Spring intializes, we'll need to read the env
variables directly.
⚠️ There's conflicts and additional changes needed on EE for build to
pass. **DO NOT MERGE** unless the author is known to be available. EE PR
also passed all at https://github.com/appsmithorg/appsmith-ee/pull/4282.
**/test all**
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9467180088>
> Commit: 402785da8df5aa6b4eeec9955421ce1ff7af305f
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9467180088&attempt=1"
target="_blank">Click here!</a>
<!-- end of auto-generated comment: Cypress test results -->