Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RSAOAEPKeyExchangeFormatter.cs
Go to the documentation of this file.
2
4
5[UnsupportedOSPlatform("browser")]
7{
8 private byte[] ParameterValue;
9
10 private RSA _rsaKey;
11
13
14 public byte[]? Parameter
15 {
16 get
17 {
18 if (ParameterValue != null)
19 {
20 return (byte[])ParameterValue.Clone();
21 }
22 return null;
23 }
24 set
25 {
26 if (value != null)
27 {
28 ParameterValue = (byte[])value.Clone();
29 }
30 else
31 {
32 ParameterValue = null;
33 }
34 }
35 }
36
37 public override string? Parameters => null;
38
40 {
41 get
42 {
43 return RngValue;
44 }
45 set
46 {
48 }
49 }
50
52 {
53 }
54
56 {
57 if (key == null)
58 {
59 throw new ArgumentNullException("key");
60 }
61 _rsaKey = (RSA)key;
62 }
63
64 public override void SetKey(AsymmetricAlgorithm key)
65 {
66 if (key == null)
67 {
68 throw new ArgumentNullException("key");
69 }
70 _rsaKey = (RSA)key;
71 }
72
73 public override byte[] CreateKeyExchange(byte[] rgbData, Type? symAlgType)
74 {
75 return CreateKeyExchange(rgbData);
76 }
77
78 public override byte[] CreateKeyExchange(byte[] rgbData)
79 {
80 if (_rsaKey == null)
81 {
83 }
85 }
86}
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