You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,23 @@ See [here](https://github.com/OpenWebconcept/plugin-prefill-gravity-forms/blob/m
46
46
2. Go to the form settings of the form you want to configure.
47
47
3. Scroll down and look for the 'iConnect' panel and configure the settings.
48
48
49
+
### 🔐 Cache Encryption
50
+
51
+
To enable secure caching of sensitive data, you **must define an encryption key** in your `wp-config.php` file. This key is used to encrypt and decrypt the cached data and should be kept secret at all times.
- Use a randomly generated, 32-character key for strong AES-256 encryption.
63
+
- Never store this key in the database.
64
+
- Keep it secret and secure — anyone with access to this key can decrypt cached data.
65
+
49
66
## License
50
67
51
68
The source code is made available under the [EUPL 1.2 license](https://github.com/OpenWebconcept/plugin-prefill-gravity-forms/blob/main/LICENSE.md). Some of the dependencies are licensed differently, with the BSD or MIT license, for example.
thrownewException('Decryption failed. Invalid data or key.', 500);
61
+
}
62
+
63
+
returnunserialize($plaintext);
64
+
}
65
+
66
+
/**
67
+
* @throws Exception
68
+
*/
69
+
privatestaticfunctiongetEncryptionKey(): string
70
+
{
71
+
if (! defined('PG_CACHE_ENCRYPTION_KEY') || strlen(PG_CACHE_ENCRYPTION_KEY) < 32) {
72
+
thrownewException('Encryption key is not defined or too short. Please define a constant PG_CACHE_ENCRYPTION_KEY with at least 32 characters in wp-config.php', 500);
0 commit comments