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
`EntityFrameworkCore.DataEncryption` is a [Microsoft Entity Framework Core](https://github.com/aspnet/EntityFrameworkCore) extension to add support of encrypted fields using built-in or custom encryption providers.
To use `EntityFrameworkCore.DataEncryption`, you will need to decorate your `string` properties of your entities with the `[Encrypted]` attribute and enable the encryption on the `ModelBuilder`.
25
+
To use `EntityFrameworkCore.DataEncryption`, you will need to decorate your `string`or `byte[]`properties of your entities with the `[Encrypted]` attribute and enable the encryption on the `ModelBuilder`.
25
26
26
27
To enable the encryption correctly, you will need to use an **encryption provider**, there is a list of the available providers:
27
28
28
29
| Name | Class | Extra |
29
30
|------|-------|-------|
30
-
|[AES](https://docs.microsoft.com/en-US/dotnet/api/system.security.cryptography.aes?view=netcore-2.2)|[AesProvider](https://github.com/Eastrall/EntityFrameworkCore.DataEncryption/blob/master/src/EntityFrameworkCore.DataEncryption/Providers/AesProvider.cs)| Can use a 128bits, 192bits or 256bits key |
31
+
|[AES](https://learn.microsoft.com/en-US/dotnet/api/system.security.cryptography.aes?view=net-6.0)|[AesProvider](https://github.com/Eastrall/EntityFrameworkCore.DataEncryption/blob/main/src/EntityFrameworkCore.DataEncryption/Providers/AesProvider.cs)| Can use a 128bits, 192bits or 256bits key |
31
32
32
33
### Example with `AesProvider`
33
34
@@ -71,21 +72,19 @@ The code bellow creates a new `AesEncryption` provider and gives it to the curre
71
72
72
73
## Create an encryption provider
73
74
74
-
> :warning: This section is outdated and doesn't work for V3.0.0 and will be updated soon.
75
-
76
75
`EntityFrameworkCore.DataEncryption` gives the possibility to create your own encryption providers. To do so, create a new class and make it inherit from `IEncryptionProvider`. You will need to implement the `Encrypt(string)` and `Decrypt(string)` methods.
0 commit comments