File tree Expand file tree Collapse file tree
src/SafeCrypt.Lib/Encryption/RsaEncryption/Models/Encrypt Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- namespace SafeCrypt . RsaEncryption . Models
1+ using System . ComponentModel . DataAnnotations ;
2+
3+ namespace SafeCrypt . RsaEncryption . Models
24{
3- internal class RsaEncryptionParameters : IEncryptionData
5+ public sealed class RsaEncryptionParameters : IEncryptionData
46 {
57 /// <summary>
68 /// Gets or sets the public key for RSA encryption.
79 /// </summary>
8- public string PublicKey { get ; set ; }
10+ [ Required ]
11+ public string PublicKey { get ; set ; }
12+
13+ /// <summary>
14+ /// Gets or sets the data to be encrypted using RSA.
15+ /// </summary>
16+ [ Required ]
17+ public string DataToEncrypt { get ; set ; }
18+ }
919
20+ public sealed class RsaDecryptionParameters
21+ {
1022 /// <summary>
11- /// Gets or sets the private key for RSA encryption.
23+ /// Gets or sets the public key for RSA encryption.
1224 /// </summary>
25+ [ Required ]
1326 public string PrivateKey { get ; set ; }
1427
1528 /// <summary>
1629 /// Gets or sets the data to be encrypted using RSA.
1730 /// </summary>
18- public string DataToEncrypt { get ; set ; }
31+ [ Required ]
32+ public byte [ ] DataToDecrypt { get ; set ; }
1933 }
2034}
You can’t perform that action at this time.
0 commit comments