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
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ A Laravel package for secure, transparent encryption and decryption of sensitive
7
7
- Encrypted data is stored in a separate `encrypted_attributes` table
8
8
- Only non-table attributes can be encrypted (enforced at runtime)
9
9
- Automatic loading and saving of encrypted attributes using Eloquent events
10
+
-**Search/filter on encrypted properties using SHA-256 hash**
10
11
- No sensitive values are ever logged
11
12
- Easy integration: just add the trait and define `$encryptedProperties` in your model
12
13
- Compatible with Laravel 9+
@@ -21,6 +22,7 @@ A Laravel package for secure, transparent encryption and decryption of sensitive
21
22
2. Define a public array property `$encryptedProperties` listing the attributes you want encrypted (these must NOT exist as columns in the model's table).
22
23
3. When you load a model, encrypted attributes are automatically decrypted and available as normal properties.
23
24
4. When you save a model, encrypted attributes are removed from the main table and securely stored in the `encrypted_attributes` table.
25
+
5.**You can filter/search on encrypted properties using the provided query scope.**
This uses the SHA-256 hash of the value and joins the `encrypted_attributes` table for efficient searching, without ever exposing the decrypted value in the query or logs.
0 commit comments