Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DssParms.cs
Go to the documentation of this file.
1
using
System.Formats.Asn1
;
2
using
System.Numerics
;
3
4
namespace
System.Security.Cryptography.Asn1
;
5
6
internal
struct
DssParms
7
{
8
internal
BigInteger
P
;
9
10
internal
BigInteger
Q
;
11
12
internal
BigInteger
G
;
13
14
internal
static
DssParms
Decode
(
ReadOnlyMemory<byte>
encoded,
AsnEncodingRules
ruleSet)
15
{
16
return
Decode
(
Asn1Tag
.
Sequence
, encoded, ruleSet);
17
}
18
19
internal
static
DssParms
Decode
(
Asn1Tag
expectedTag,
ReadOnlyMemory<byte>
encoded,
AsnEncodingRules
ruleSet)
20
{
21
try
22
{
23
AsnValueReader
reader =
new
AsnValueReader
(encoded.
Span
, ruleSet);
24
DecodeCore
(ref reader, expectedTag, encoded, out var decoded);
25
reader.
ThrowIfNotEmpty
();
26
return
decoded;
27
}
28
catch
(
AsnContentException
inner)
29
{
30
throw
new
CryptographicException
(
System
.
SR
.
Cryptography_Der_Invalid_Encoding
, inner);
31
}
32
}
33
34
private
static
void
DecodeCore
(ref
AsnValueReader
reader,
Asn1Tag
expectedTag,
ReadOnlyMemory<byte>
rebind, out
DssParms
decoded)
35
{
36
decoded =
default
(
DssParms
);
37
AsnValueReader
asnValueReader = reader.
ReadSequence
(expectedTag);
38
decoded.P = asnValueReader.
ReadInteger
();
39
decoded.Q = asnValueReader.
ReadInteger
();
40
decoded.G = asnValueReader.
ReadInteger
();
41
asnValueReader.
ThrowIfNotEmpty
();
42
}
43
}
System.Formats.Asn1.AsnContentException
Definition
AsnContentException.cs:7
System.SR.Cryptography_Der_Invalid_Encoding
static string Cryptography_Der_Invalid_Encoding
Definition
SR.cs:50
System.SR
Definition
SR.cs:7
System.Security.Cryptography.CryptographicException
Definition
CryptographicException.cs:9
System.Formats.Asn1.AsnEncodingRules
AsnEncodingRules
Definition
AsnEncodingRules.cs:4
System.Formats.Asn1
Definition
Asn1Tag.cs:3
System.Numerics
Definition
BitOperations.cs:7
System.Security.Cryptography.Asn1
Definition
AlgorithmIdentifierAsn.cs:3
System
Definition
BlockingCollection.cs:8
System.Formats.Asn1.Asn1Tag.Sequence
static readonly Asn1Tag Sequence
Definition
Asn1Tag.cs:29
System.Formats.Asn1.Asn1Tag
Definition
Asn1Tag.cs:6
System.Formats.Asn1.AsnValueReader.ThrowIfNotEmpty
void ThrowIfNotEmpty()
Definition
AsnValueReader.cs:21
System.Formats.Asn1.AsnValueReader.ReadInteger
BigInteger ReadInteger(Asn1Tag? expectedTag=null)
Definition
AsnValueReader.cs:48
System.Formats.Asn1.AsnValueReader.ReadSequence
AsnValueReader ReadSequence(Asn1Tag? expectedTag=null)
Definition
AsnValueReader.cs:112
System.Formats.Asn1.AsnValueReader
Definition
AsnValueReader.cs:6
System.Numerics.BigInteger
Definition
BigInteger.cs:10
System.ReadOnlyMemory.Span
unsafe ReadOnlySpan< T > Span
Definition
ReadOnlyMemory.cs:30
System.ReadOnlyMemory
Definition
ReadOnlyMemory.cs:14
System.Security.Cryptography.Asn1.DssParms.Decode
static DssParms Decode(ReadOnlyMemory< byte > encoded, AsnEncodingRules ruleSet)
Definition
DssParms.cs:14
System.Security.Cryptography.Asn1.DssParms.Q
BigInteger Q
Definition
DssParms.cs:10
System.Security.Cryptography.Asn1.DssParms.Decode
static DssParms Decode(Asn1Tag expectedTag, ReadOnlyMemory< byte > encoded, AsnEncodingRules ruleSet)
Definition
DssParms.cs:19
System.Security.Cryptography.Asn1.DssParms.DecodeCore
static void DecodeCore(ref AsnValueReader reader, Asn1Tag expectedTag, ReadOnlyMemory< byte > rebind, out DssParms decoded)
Definition
DssParms.cs:34
System.Security.Cryptography.Asn1.DssParms.P
BigInteger P
Definition
DssParms.cs:8
System.Security.Cryptography.Asn1.DssParms.G
BigInteger G
Definition
DssParms.cs:12
System.Security.Cryptography.Asn1.DssParms
Definition
DssParms.cs:7
source
System.Security.Cryptography.Algorithms
System.Security.Cryptography.Asn1
DssParms.cs
Generated by
1.10.0