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

Public Member Functions

 ECDsaCng (CngKey key)
 
override bool TryExportPkcs8PrivateKey (Span< byte > destination, out int bytesWritten)
 
void FromXmlString (string xml, ECKeyXmlFormat format)
 
byte[] SignData (byte[] data)
 
byte[] SignData (byte[] data, int offset, int count)
 
byte[] SignData (Stream data)
 
string ToXmlString (ECKeyXmlFormat format)
 
bool VerifyData (byte[] data, byte[] signature)
 
bool VerifyData (byte[] data, int offset, int count, byte[] signature)
 
bool VerifyData (Stream data, byte[] signature)
 
override void GenerateKey (ECCurve curve)
 
override void ImportParameters (ECParameters parameters)
 
override ECParameters ExportExplicitParameters (bool includePrivateParameters)
 
override ECParameters ExportParameters (bool includePrivateParameters)
 
override void ImportPkcs8PrivateKey (ReadOnlySpan< byte > source, out int bytesRead)
 
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)
 
 ECDsaCng (ECCurve curve)
 
 ECDsaCng ()
 
 ECDsaCng (int keySize)
 
unsafe override byte[] SignHash (byte[] hash)
 
unsafe override bool TrySignHash (ReadOnlySpan< byte > source, Span< byte > destination, out int bytesWritten)
 
override bool VerifyHash (byte[] hash, byte[] signature)
 
unsafe override bool VerifyHash (ReadOnlySpan< byte > hash, ReadOnlySpan< byte > signature)
 
virtual byte[] SignData (byte[] data, HashAlgorithmName hashAlgorithm)
 
virtual byte[] SignData (byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm)
 
byte[] SignData (byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
byte[] SignData (byte[] data, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
byte[] SignData (Stream data, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual byte[] SignData (Stream data, HashAlgorithmName hashAlgorithm)
 
byte[] SignHash (byte[] hash, DSASignatureFormat signatureFormat)
 
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)
 
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)
 
bool VerifyData (byte[] data, byte[] signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual bool VerifyData (ReadOnlySpan< byte > data, ReadOnlySpan< byte > signature, HashAlgorithmName hashAlgorithm)
 
bool VerifyData (ReadOnlySpan< byte > data, ReadOnlySpan< byte > signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
bool VerifyData (Stream data, byte[] signature, HashAlgorithmName hashAlgorithm)
 
bool VerifyData (Stream data, byte[] signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
bool VerifyHash (byte[] hash, byte[] signature, DSASignatureFormat signatureFormat)
 
bool VerifyHash (ReadOnlySpan< byte > hash, ReadOnlySpan< byte > signature, DSASignatureFormat signatureFormat)
 
bool TrySignHash (ReadOnlySpan< byte > hash, Span< byte > destination, DSASignatureFormat signatureFormat, out int bytesWritten)
 
override bool TryExportSubjectPublicKeyInfo (Span< byte > destination, out int bytesWritten)
 
override void ImportSubjectPublicKeyInfo (ReadOnlySpan< byte > source, out int bytesRead)
 
virtual unsafe void ImportECPrivateKey (ReadOnlySpan< byte > source, out int bytesRead)
 
virtual unsafe byte[] ExportECPrivateKey ()
 
virtual unsafe bool TryExportECPrivateKey (Span< byte > destination, out int bytesWritten)
 
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? ECDsa Create (string algorithm)
 
static new ECDsa Create ()
 
static ECDsa Create (ECCurve curve)
 
static ECDsa Create (ECParameters 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)
 
virtual byte[] SignDataCore (ReadOnlySpan< byte > data, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual byte[] SignDataCore (Stream data, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual byte[] SignHashCore (ReadOnlySpan< byte > hash, DSASignatureFormat signatureFormat)
 
virtual bool TrySignDataCore (ReadOnlySpan< byte > data, Span< byte > destination, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat, out int bytesWritten)
 
virtual bool VerifyDataCore (ReadOnlySpan< byte > data, ReadOnlySpan< byte > signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual bool VerifyDataCore (Stream data, ReadOnlySpan< byte > signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
 
virtual bool TrySignHashCore (ReadOnlySpan< byte > hash, Span< byte > destination, DSASignatureFormat signatureFormat, out int bytesWritten)
 
virtual bool VerifyHashCore (ReadOnlySpan< byte > hash, ReadOnlySpan< byte > signature, DSASignatureFormat signatureFormat)
 

Protected Attributes

int KeySizeValue
 
KeySizes[] LegalKeySizesValue
 

Package Functions

string GetCurveName (out string oidValue)
 

Properties

CngAlgorithm HashAlgorithm [get, set]
 
CngKey Key [get, private set]
 
override int KeySize [get, set]
 
override KeySizes[] LegalKeySizes [get]
 
override? string KeyExchangeAlgorithm [get]
 
override string SignatureAlgorithm [get]
 

Private Member Functions

void ThrowIfDisposed ()
 
void DisposeKey ()
 
void ImportFullKeyBlob (byte[] ecfullKeyBlob, bool includePrivateParameters)
 
void ImportKeyBlob (byte[] ecfullKeyBlob, string curveName, bool includePrivateParameters)
 
byte[] ExportKeyBlob (bool includePrivateParameters)
 
byte[] ExportFullKeyBlob (bool includePrivateParameters)
 
void AcceptImport (System.Security.Cryptography.CngPkcs8.Pkcs8Response response)
 
byte[] ExportEncryptedPkcs8 (ReadOnlySpan< char > pkcs8Password, int kdfCount)
 
bool TryExportEncryptedPkcs8 (ReadOnlySpan< char > pkcs8Password, int kdfCount, Span< byte > destination, out int bytesWritten)
 
CngKey GetKey ()
 
SafeNCryptKeyHandle GetDuplicatedKeyHandle ()
 
void ProcessPkcs8Response (System.Security.Cryptography.CngPkcs8.Pkcs8Response response)
 
void ForceSetKeySize (int newKeySize)
 
ReadOnlySpan< byte > HashSpanToTmp (ReadOnlySpan< byte > data, HashAlgorithmName hashAlgorithm, Span< byte > tmp)
 
byte[] HashSpanToArray (ReadOnlySpan< byte > data, HashAlgorithmName hashAlgorithm)
 
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 IsEccAlgorithmGroup (CngAlgorithmGroup algorithmGroup)
 
static unsafe byte[] ExportArray< T > (ReadOnlySpan< T > password, PbeParameters pbeParameters, TryExportPbe< T > exporter)
 
static unsafe byte[] ExportArray (TryExport exporter)
 

Private Attributes

CngAlgorithmCore _core = new CngAlgorithmCore("ECDsaCng")
 
CngAlgorithm _hashAlgorithm = CngAlgorithm.Sha256
 

Static Private Attributes

static readonly string[] s_validOids = new string[1] { "1.2.840.10045.2.1" }
 

Detailed Description

Definition at line 7 of file ECDsaCng.cs.


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