Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RSAPKCS1KeyExchangeFormatter.cs
Go to the documentation of this file.
2
4
5[UnsupportedOSPlatform("browser")]
7{
8 private RSA _rsaKey;
9
11
12 public override string Parameters => "<enc:KeyEncryptionMethod enc:Algorithm=\"http://www.microsoft.com/xml/security/algorithm/PKCS1-v1.5-KeyEx\" xmlns:enc=\"http://www.microsoft.com/xml/security/encryption/v1.0\" />";
13
15 {
16 get
17 {
18 return RngValue;
19 }
20 set
21 {
23 }
24 }
25
27 {
28 }
29
31 {
32 if (key == null)
33 {
34 throw new ArgumentNullException("key");
35 }
36 _rsaKey = (RSA)key;
37 }
38
39 public override void SetKey(AsymmetricAlgorithm key)
40 {
41 if (key == null)
42 {
43 throw new ArgumentNullException("key");
44 }
45 _rsaKey = (RSA)key;
46 }
47
48 public override byte[] CreateKeyExchange(byte[] rgbData, Type? symAlgType)
49 {
50 return CreateKeyExchange(rgbData);
51 }
52
53 public override byte[] CreateKeyExchange(byte[] rgbData)
54 {
55 if (_rsaKey == null)
56 {
58 }
60 }
61}
static string Cryptography_MissingKey
Definition SR.cs:114
Definition SR.cs:7
override byte[] CreateKeyExchange(byte[] rgbData, Type? symAlgType)
virtual byte[] Encrypt(byte[] data, RSAEncryptionPadding padding)
Definition RSA.cs:60