File tree Expand file tree Collapse file tree
src/Encryption/AesEncryption/Models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,4 +28,25 @@ public class ByteEncryptionParameters
2828 [ Required ]
2929 public byte [ ] IV { get ; set ; }
3030 }
31+
32+ public class ByteDecryptionParameters
33+ {
34+ /// <summary>
35+ /// Gets or sets the data to be encrypted.
36+ /// </summary>
37+ [ Required ]
38+ public byte [ ] Data { get ; set ; }
39+
40+ /// <summary>
41+ /// Gets or sets the secret key used for encryption.
42+ /// </summary>
43+ [ Required ]
44+ public byte [ ] SecretKey { get ; set ; }
45+
46+ /// <summary>
47+ /// Gets or sets the initialization vector (IV) used for encryption.
48+ /// </summary>
49+ [ Required ]
50+ public byte [ ] IV { get ; set ; }
51+ }
3152}
Original file line number Diff line number Diff line change @@ -6,5 +6,22 @@ namespace SafeCrypt.Models
66{
77 public class DecryptionData
88 {
9+ /// <summary>
10+ /// Gets or sets the data to be encrypted.
11+ /// </summary>
12+ public string DecryptedData { get ; set ; }
13+
14+ /// <summary>
15+ /// Gets or sets the initialization vector (IV) used for encryption.
16+ /// </summary>
17+ public string Iv { get ; set ; }
18+
19+ /// <summary>
20+ /// Gets or sets the secret key used for encryption. Should be a base64 string
21+ /// </summary>
22+ public string SecretKey { get ; set ; }
23+
24+ public bool HasError { get ; set ; }
25+ public List < string > Errors { get ; set ; } = new List < string > ( ) ;
926 }
1027}
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . ComponentModel . DataAnnotations ;
4+ using System . Text ;
5+
6+ namespace SafeCrypt . Models
7+ {
8+ public class DecryptionParameters
9+ {
10+ /// <summary>
11+ /// Gets or sets the data to be decrypted.
12+ /// </summary>
13+ [ Required ]
14+ public string DataToDecrypt { get ; set ; }
15+
16+ /// <summary>
17+ /// Gets or sets the secret key used for decryption.
18+ /// </summary>
19+ [ Required ]
20+ public string SecretKey { get ; set ; }
21+
22+ /// <summary>
23+ /// Gets or sets the initialization vector (IV) used for decryption.
24+ /// </summary>
25+ [ Required ]
26+ public string IV { get ; set ; }
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments