Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RSAPKCS1KeyExchangeDeformatter.cs
Go to the documentation of this file.
1
using
System.Runtime.Versioning
;
2
3
namespace
System.Security.Cryptography
;
4
5
[UnsupportedOSPlatform(
"browser"
)]
6
public
class
RSAPKCS1KeyExchangeDeformatter
:
AsymmetricKeyExchangeDeformatter
7
{
8
private
RSA
_rsaKey
;
9
10
private
RandomNumberGenerator
RngValue
;
11
12
public
RandomNumberGenerator
?
RNG
13
{
14
get
15
{
16
return
RngValue
;
17
}
18
set
19
{
20
RngValue
=
value
;
21
}
22
}
23
24
public
override
string
?
Parameters
25
{
26
get
27
{
28
return
null
;
29
}
30
set
31
{
32
}
33
}
34
35
public
RSAPKCS1KeyExchangeDeformatter
()
36
{
37
}
38
39
public
RSAPKCS1KeyExchangeDeformatter
(
AsymmetricAlgorithm
key
)
40
{
41
if
(
key
==
null
)
42
{
43
throw
new
ArgumentNullException
(
"key"
);
44
}
45
_rsaKey
= (
RSA
)
key
;
46
}
47
48
public
override
byte
[]
DecryptKeyExchange
(
byte
[] rgbIn)
49
{
50
if
(
_rsaKey
==
null
)
51
{
52
throw
new
CryptographicUnexpectedOperationException
(
System
.
SR
.
Cryptography_MissingKey
);
53
}
54
return
_rsaKey
.
Decrypt
(rgbIn,
RSAEncryptionPadding
.
Pkcs1
);
55
}
56
57
public
override
void
SetKey
(
AsymmetricAlgorithm
key
)
58
{
59
if
(
key
==
null
)
60
{
61
throw
new
ArgumentNullException
(
"key"
);
62
}
63
_rsaKey
= (
RSA
)
key
;
64
}
65
}
System.ArgumentNullException
Definition
ArgumentNullException.cs:10
System.SR.Cryptography_MissingKey
static string Cryptography_MissingKey
Definition
SR.cs:114
System.SR
Definition
SR.cs:7
System.Security.Cryptography.AsymmetricAlgorithm
Definition
AsymmetricAlgorithm.cs:6
System.Security.Cryptography.AsymmetricKeyExchangeDeformatter
Definition
AsymmetricKeyExchangeDeformatter.cs:7
System.Security.Cryptography.CryptographicUnexpectedOperationException
Definition
CryptographicUnexpectedOperationException.cs:10
System.Security.Cryptography.RSAEncryptionPadding.Pkcs1
static RSAEncryptionPadding Pkcs1
Definition
RSAEncryptionPadding.cs:23
System.Security.Cryptography.RSAEncryptionPadding
Definition
RSAEncryptionPadding.cs:8
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter.RSAPKCS1KeyExchangeDeformatter
RSAPKCS1KeyExchangeDeformatter()
Definition
RSAPKCS1KeyExchangeDeformatter.cs:35
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter.RNG
RandomNumberGenerator? RNG
Definition
RSAPKCS1KeyExchangeDeformatter.cs:13
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter._rsaKey
RSA _rsaKey
Definition
RSAPKCS1KeyExchangeDeformatter.cs:8
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter.Parameters
override? string Parameters
Definition
RSAPKCS1KeyExchangeDeformatter.cs:25
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter.SetKey
override void SetKey(AsymmetricAlgorithm key)
Definition
RSAPKCS1KeyExchangeDeformatter.cs:57
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter.RngValue
RandomNumberGenerator RngValue
Definition
RSAPKCS1KeyExchangeDeformatter.cs:10
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter.RSAPKCS1KeyExchangeDeformatter
RSAPKCS1KeyExchangeDeformatter(AsymmetricAlgorithm key)
Definition
RSAPKCS1KeyExchangeDeformatter.cs:39
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter.DecryptKeyExchange
override byte[] DecryptKeyExchange(byte[] rgbIn)
Definition
RSAPKCS1KeyExchangeDeformatter.cs:48
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
Definition
RSAPKCS1KeyExchangeDeformatter.cs:7
System.Security.Cryptography.RSA.Decrypt
virtual byte[] Decrypt(byte[] data, RSAEncryptionPadding padding)
Definition
RSA.cs:65
System.Security.Cryptography.RSA
Definition
RSA.cs:15
System.Security.Cryptography.RandomNumberGenerator
Definition
RandomNumberGenerator.cs:9
System.Runtime.Versioning
Definition
NonVersionableAttribute.cs:1
System.Security.Cryptography
Definition
CryptoPool.cs:3
System.ExceptionArgument.value
@ value
System.ExceptionArgument.key
@ key
System
Definition
BlockingCollection.cs:8
source
System.Security.Cryptography.Algorithms
System.Security.Cryptography
RSAPKCS1KeyExchangeDeformatter.cs
Generated by
1.10.0