Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Security.Cryptography.DSAImplementation.DSACng Class Referencesealed

Public Member Functions

 DSACng ()
 
 DSACng (int keySize)
 
override void ImportParameters (DSAParameters parameters)
 
override void ImportEncryptedPkcs8PrivateKey (ReadOnlySpan< byte > passwordBytes, ReadOnlySpan< byte > source, out int bytesRead)
 
override void ImportEncryptedPkcs8PrivateKey (ReadOnlySpan< char > password, ReadOnlySpan< byte > source, out int bytesRead)
 
override byte[] ExportEncryptedPkcs8PrivateKey (ReadOnlySpan< byte > passwordBytes, PbeParameters pbeParameters)
 
override byte[] ExportEncryptedPkcs8PrivateKey (ReadOnlySpan< char > password, PbeParameters pbeParameters)
 
override bool TryExportEncryptedPkcs8PrivateKey (ReadOnlySpan< byte > passwordBytes, PbeParameters pbeParameters, Span< byte > destination, out int bytesWritten)
 
override bool TryExportEncryptedPkcs8PrivateKey (ReadOnlySpan< char > password, PbeParameters pbeParameters, Span< byte > destination, out int bytesWritten)
 
unsafe override DSAParameters ExportParameters (bool includePrivateParameters)
 
unsafe override byte[] CreateSignature (byte[] rgbHash)
 
override bool VerifySignature (byte[] rgbHash, byte[] rgbSignature)
 
byte[] CreateSignature (byte[] rgbHash, DSASignatureFormat signatureFormat)
 
bool VerifySignature (byte[] rgbHash, byte[] rgbSignature, DSASignatureFormat signatureFormat)
 
virtual bool VerifySignature (ReadOnlySpan< byte > hash, ReadOnlySpan< byte > signature)
 
bool VerifySignature (ReadOnlySpan< byte > hash, ReadOnlySpan< byte > signature, DSASignatureFormat signatureFormat)
 
byte[] SignData (byte[] data, HashAlgorithmName hashAlgorithm)
 
byte[] SignData (byte[] data, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual byte[] SignData (byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm)
 
byte[] SignData (byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual byte[] SignData (Stream data, HashAlgorithmName hashAlgorithm)
 
byte[] SignData (Stream data, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
bool VerifyData (byte[] data, byte[] signature, HashAlgorithmName hashAlgorithm)
 
virtual bool VerifyData (byte[] data, int offset, int count, byte[] signature, HashAlgorithmName hashAlgorithm)
 
bool VerifyData (byte[] data, int offset, int count, byte[] signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual bool VerifyData (Stream data, byte[] signature, HashAlgorithmName hashAlgorithm)
 
virtual bool VerifyData (ReadOnlySpan< byte > data, ReadOnlySpan< byte > signature, HashAlgorithmName hashAlgorithm)
 
bool VerifyData (byte[] data, byte[] signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
bool VerifyData (Stream data, byte[] signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
bool VerifyData (ReadOnlySpan< byte > data, ReadOnlySpan< byte > signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual bool TryCreateSignature (ReadOnlySpan< byte > hash, Span< byte > destination, out int bytesWritten)
 
bool TryCreateSignature (ReadOnlySpan< byte > hash, Span< byte > destination, DSASignatureFormat signatureFormat, out int bytesWritten)
 
virtual bool TrySignData (ReadOnlySpan< byte > data, Span< byte > destination, HashAlgorithmName hashAlgorithm, out int bytesWritten)
 
bool TrySignData (ReadOnlySpan< byte > data, Span< byte > destination, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat, out int bytesWritten)
 
override bool TryExportPkcs8PrivateKey (Span< byte > destination, out int bytesWritten)
 
override bool TryExportSubjectPublicKeyInfo (Span< byte > destination, out int bytesWritten)
 
unsafe override void ImportPkcs8PrivateKey (ReadOnlySpan< byte > source, out int bytesRead)
 
override void ImportSubjectPublicKeyInfo (ReadOnlySpan< byte > source, out int bytesRead)
 
int GetMaxSignatureSize (DSASignatureFormat signatureFormat)
 
override void ImportFromPem (ReadOnlySpan< char > input)
 
override void ImportFromEncryptedPem (ReadOnlySpan< char > input, ReadOnlySpan< char > password)
 
override void ImportFromEncryptedPem (ReadOnlySpan< char > input, ReadOnlySpan< byte > passwordBytes)
 
override void FromXmlString (string xmlString)
 
override string ToXmlString (bool includePrivateParameters)
 
void Clear ()
 
void Dispose ()
 
virtual byte[] ExportPkcs8PrivateKey ()
 
virtual byte[] ExportSubjectPublicKeyInfo ()
 

Static Public Member Functions

static new? DSA Create (string algName)
 
static new DSA Create ()
 
static DSA Create (int keySizeInBits)
 
static DSA Create (DSAParameters parameters)
 

Protected Member Functions

override void Dispose (bool disposing)
 
override byte[] HashData (byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm)
 
override byte[] HashData (Stream data, HashAlgorithmName hashAlgorithm)
 
override bool TryHashData (ReadOnlySpan< byte > source, Span< byte > destination, HashAlgorithmName hashAlgorithm, out int bytesWritten)
 
unsafe override bool TryCreateSignatureCore (ReadOnlySpan< byte > hash, Span< byte > destination, DSASignatureFormat signatureFormat, out int bytesWritten)
 
unsafe override bool VerifySignatureCore (ReadOnlySpan< byte > hash, ReadOnlySpan< byte > signature, DSASignatureFormat signatureFormat)
 
virtual byte[] SignDataCore (ReadOnlySpan< byte > data, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual byte[] SignDataCore (Stream data, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual byte[] CreateSignatureCore (ReadOnlySpan< byte > hash, DSASignatureFormat signatureFormat)
 
virtual bool TrySignDataCore (ReadOnlySpan< byte > data, Span< byte > destination, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat, out int bytesWritten)
 
virtual bool VerifyDataCore (Stream data, ReadOnlySpan< byte > signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual bool VerifyDataCore (ReadOnlySpan< byte > data, ReadOnlySpan< byte > signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 

Protected Attributes

int KeySizeValue
 
KeySizes[] LegalKeySizesValue
 

Static Package Functions

static Exception HashAlgorithmNameNullOrEmpty ()
 

Properties

override KeySizes[] LegalKeySizes [get]
 
override string SignatureAlgorithm [get]
 
override string KeyExchangeAlgorithm [get]
 
virtual int KeySize [get, set]
 

Private Member Functions

void ThrowIfDisposed ()
 
SafeNCryptKeyHandle GetDuplicatedKeyHandle ()
 
byte[] ExportKeyBlob (bool includePrivateParameters)
 
byte[] ExportEncryptedPkcs8 (ReadOnlySpan< char > pkcs8Password, int kdfCount)
 
bool TryExportEncryptedPkcs8 (ReadOnlySpan< char > pkcs8Password, int kdfCount, Span< byte > destination, out int bytesWritten)
 
void ImportKeyBlob (byte[] dsaBlob, bool includePrivate)
 
void SetKeyHandle (SafeNCryptKeyHandle keyHandle)
 
void ForceSetKeySize (int newKeySize)
 
ReadOnlySpan< byte > AdjustHashSizeIfNecessary (ReadOnlySpan< byte > hash, Span< byte > stackBuf)
 
unsafe int ComputeQLength ()
 
ReadOnlySpan< byte > HashSpanToTmp (ReadOnlySpan< byte > data, HashAlgorithmName hashAlgorithm, Span< byte > tmp)
 
byte[] HashSpanToArray (ReadOnlySpan< byte > data, HashAlgorithmName hashAlgorithm)
 
unsafe AsnWriter WritePkcs8 ()
 
AsnWriter WriteSubjectPublicKeyInfo ()
 
delegate bool TryExportPbe< T > (ReadOnlySpan< T > password, PbeParameters pbeParameters, Span< byte > destination, out int bytesWritten)
 
delegate bool TryExport (Span< byte > destination, out int bytesWritten)
 

Static Private Member Functions

static bool Supports2048KeySize ()
 
static unsafe void GenerateV1DsaBlob (out byte[] blob, DSAParameters parameters, int cbKey, bool includePrivate)
 
static unsafe void GenerateV2DsaBlob (out byte[] blob, DSAParameters parameters, int cbKey, bool includePrivateParameters)
 
static void CheckMagicValueOfKey (global::Interop.BCrypt.KeyBlobMagicNumber magic, bool includePrivateParameters)
 
static Exception DerivedClassMustOverride ()
 
static byte[] ReadRequiredElement (ref XmlKeyHelper.ParseState state, string name, int sizeHint=-1)
 
static DSA CreateCore ()
 
static unsafe byte[] ExportArray< T > (ReadOnlySpan< T > password, PbeParameters pbeParameters, TryExportPbe< T > exporter)
 
static unsafe byte[] ExportArray (TryExport exporter)
 

Private Attributes

SafeNCryptKeyHandle _keyHandle
 
int _lastKeySize
 
bool _disposed
 

Static Private Attributes

static readonly KeySizes[] s_legalKeySizes
 
static readonly int s_defaultKeySize = (Supports2048KeySize() ? 2048 : 1024)
 

Detailed Description

Definition at line 10 of file DSAImplementation.cs.


The documentation for this class was generated from the following file: