Skip to content

Commit e2eee43

Browse files
authored
Update README.md
1 parent 6f811d8 commit e2eee43

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,16 @@ public class DatabaseContext : DbContext
107107
}
108108
}
109109
```
110+
111+
112+
## Important notes
113+
114+
### AES Provider structure
115+
116+
The following section describes how encrypted fields using the built-in AES provider encrypts data.
117+
118+
For each encrypted field, the provider generates a new IV with a length of `16 bytes`. These 16 bytes are written at the begining of the `CryptoStream` followed by the actual input to encrypt.
119+
120+
Similarly, for reading, the provider reads the first **16 bytes** from the input data converted as a `byte[]` to retrieve the initialization vector and then read the encrypted content.
121+
122+
For more information, checkout the [`AesProvider`](https://github.com/Eastrall/EntityFrameworkCore.DataEncryption/blob/master/src/EntityFrameworkCore.DataEncryption/Providers/AesProvider.cs#L58) class.

0 commit comments

Comments
 (0)