|
3 | 3 |
|
4 | 4 | namespace Microsoft.EntityFrameworkCore.DataEncryption |
5 | 5 | { |
6 | | - /// <summary> |
7 | | - /// Provides a mechanism for implementing a custom encryption provider. |
8 | | - /// </summary> |
9 | | - public interface IEncryptionProvider |
10 | | - { |
11 | | - /// <summary> |
12 | | - /// Encrypts a value. |
13 | | - /// </summary> |
14 | | - /// <typeparam name="TStore"> |
15 | | - /// The type of data stored in the database. |
16 | | - /// </typeparam> |
17 | | - /// <typeparam name="TModel"> |
18 | | - /// The type of value stored in the model. |
19 | | - /// </typeparam> |
20 | | - /// <param name="dataToEncrypt"> |
21 | | - /// Input data to encrypt. |
22 | | - /// </param> |
23 | | - /// <param name="converter"> |
24 | | - /// Function which converts the model value to a byte array. |
25 | | - /// </param> |
26 | | - /// <param name="encoder"> |
27 | | - /// Function which encodes the value for storing the the database. |
28 | | - /// </param> |
29 | | - /// <returns> |
30 | | - /// Encrypted data. |
31 | | - /// </returns> |
32 | | - /// <exception cref="ArgumentNullException"> |
33 | | - /// <para><paramref name="converter"/> is <see langword="null"/>.</para> |
34 | | - /// <para>-or-</para> |
35 | | - /// <para><paramref name="encoder"/> is <see langword="null"/>.</para> |
36 | | - /// </exception> |
37 | | - TStore Encrypt<TStore, TModel>(TModel dataToEncrypt, Func<TModel, byte[]> converter, Func<Stream, TStore> encoder); |
| 6 | + /// <summary> |
| 7 | + /// Provides a mechanism for implementing a custom encryption provider. |
| 8 | + /// </summary> |
| 9 | + public interface IEncryptionProvider |
| 10 | + { |
| 11 | + /// <summary> |
| 12 | + /// Encrypts a value. |
| 13 | + /// </summary> |
| 14 | + /// <typeparam name="TStore"> |
| 15 | + /// The type of data stored in the database. |
| 16 | + /// </typeparam> |
| 17 | + /// <typeparam name="TModel"> |
| 18 | + /// The type of value stored in the model. |
| 19 | + /// </typeparam> |
| 20 | + /// <param name="dataToEncrypt"> |
| 21 | + /// Input data to encrypt. |
| 22 | + /// </param> |
| 23 | + /// <param name="converter"> |
| 24 | + /// Function which converts the model value to a byte array. |
| 25 | + /// </param> |
| 26 | + /// <param name="encoder"> |
| 27 | + /// Function which encodes the value for storing the the database. |
| 28 | + /// </param> |
| 29 | + /// <returns> |
| 30 | + /// Encrypted data. |
| 31 | + /// </returns> |
| 32 | + /// <exception cref="ArgumentNullException"> |
| 33 | + /// <para><paramref name="converter"/> is <see langword="null"/>.</para> |
| 34 | + /// <para>-or-</para> |
| 35 | + /// <para><paramref name="encoder"/> is <see langword="null"/>.</para> |
| 36 | + /// </exception> |
| 37 | + TStore Encrypt<TStore, TModel>(TModel dataToEncrypt, Func<TModel, byte[]> converter, Func<Stream, TStore> encoder); |
38 | 38 |
|
39 | | - /// <summary> |
40 | | - /// Decrypts a value. |
41 | | - /// </summary> |
42 | | - /// <typeparam name="TStore"> |
43 | | - /// The type of data stored in the database. |
44 | | - /// </typeparam> |
45 | | - /// <typeparam name="TModel"> |
46 | | - /// The type of value stored in the model. |
47 | | - /// </typeparam> |
48 | | - /// <param name="dataToDecrypt"> |
49 | | - /// Encrypted data to decrypt. |
50 | | - /// </param> |
51 | | - /// <param name="decoder"> |
52 | | - /// Function which converts the stored data to a byte array. |
53 | | - /// </param> |
54 | | - /// <param name="converter"> |
55 | | - /// Function which converts the decrypted <see cref="Stream"/> to the return value. |
56 | | - /// </param> |
57 | | - /// <returns> |
58 | | - /// Decrypted data. |
59 | | - /// </returns> |
60 | | - /// <exception cref="ArgumentNullException"> |
61 | | - /// <para><paramref name="decoder"/> is <see langword="null"/>.</para> |
62 | | - /// <para>-or-</para> |
63 | | - /// <para><paramref name="converter"/> is <see langword="null"/>.</para> |
64 | | - /// </exception> |
65 | | - TModel Decrypt<TStore, TModel>(TStore dataToDecrypt, Func<TStore, byte[]> decoder, Func<Stream, TModel> converter); |
66 | | - } |
| 39 | + /// <summary> |
| 40 | + /// Decrypts a value. |
| 41 | + /// </summary> |
| 42 | + /// <typeparam name="TStore"> |
| 43 | + /// The type of data stored in the database. |
| 44 | + /// </typeparam> |
| 45 | + /// <typeparam name="TModel"> |
| 46 | + /// The type of value stored in the model. |
| 47 | + /// </typeparam> |
| 48 | + /// <param name="dataToDecrypt"> |
| 49 | + /// Encrypted data to decrypt. |
| 50 | + /// </param> |
| 51 | + /// <param name="decoder"> |
| 52 | + /// Function which converts the stored data to a byte array. |
| 53 | + /// </param> |
| 54 | + /// <param name="converter"> |
| 55 | + /// Function which converts the decrypted <see cref="Stream"/> to the return value. |
| 56 | + /// </param> |
| 57 | + /// <returns> |
| 58 | + /// Decrypted data. |
| 59 | + /// </returns> |
| 60 | + /// <exception cref="ArgumentNullException"> |
| 61 | + /// <para><paramref name="decoder"/> is <see langword="null"/>.</para> |
| 62 | + /// <para>-or-</para> |
| 63 | + /// <para><paramref name="converter"/> is <see langword="null"/>.</para> |
| 64 | + /// </exception> |
| 65 | + TModel Decrypt<TStore, TModel>(TStore dataToDecrypt, Func<TStore, byte[]> decoder, Func<Stream, TModel> converter); |
| 66 | + } |
67 | 67 | } |
0 commit comments