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

Public Member Functions

 ECDiffieHellmanCng (CngKey key)
 
override bool TryExportPkcs8PrivateKey (Span< byte > destination, out int bytesWritten)
 
override byte[] DeriveKeyMaterial (ECDiffieHellmanPublicKey otherPartyPublicKey)
 
byte[] DeriveKeyMaterial (CngKey otherPartyPublicKey)
 
SafeNCryptSecretHandle DeriveSecretAgreementHandle (ECDiffieHellmanPublicKey otherPartyPublicKey)
 
SafeNCryptSecretHandle DeriveSecretAgreementHandle (CngKey otherPartyPublicKey)
 
override void GenerateKey (ECCurve curve)
 
void FromXmlString (string xml, ECKeyXmlFormat format)
 
string ToXmlString (ECKeyXmlFormat format)
 
 ECDiffieHellmanCng ()
 
 ECDiffieHellmanCng (int keySize)
 
 ECDiffieHellmanCng (ECCurve curve)
 
override byte[] DeriveKeyFromHash (ECDiffieHellmanPublicKey otherPartyPublicKey, HashAlgorithmName hashAlgorithm, byte[]? secretPrepend, byte[]? secretAppend)
 
override byte[] DeriveKeyFromHmac (ECDiffieHellmanPublicKey otherPartyPublicKey, HashAlgorithmName hashAlgorithm, byte[]? hmacKey, byte[]? secretPrepend, byte[]? secretAppend)
 
override byte[] DeriveKeyTls (ECDiffieHellmanPublicKey otherPartyPublicKey, byte[] prfLabel, byte[] prfSeed)
 
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)
 
byte[] DeriveKeyFromHash (ECDiffieHellmanPublicKey otherPartyPublicKey, HashAlgorithmName hashAlgorithm)
 
byte[] DeriveKeyFromHmac (ECDiffieHellmanPublicKey otherPartyPublicKey, HashAlgorithmName hashAlgorithm, byte[]? hmacKey)
 
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)
 
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? ECDiffieHellman Create (string algorithm)
 
static new ECDiffieHellman Create ()
 
static ECDiffieHellman Create (ECCurve curve)
 
static ECDiffieHellman Create (ECParameters parameters)
 

Protected Member Functions

override void Dispose (bool disposing)
 

Protected Attributes

int KeySizeValue
 
KeySizes[] LegalKeySizesValue
 

Package Functions

string GetCurveName (out string oidValue)
 

Properties

CngAlgorithm HashAlgorithm [get, set]
 
ECDiffieHellmanKeyDerivationFunction KeyDerivationFunction [get, set]
 
byte?[] HmacKey [get, set]
 
byte?[] Label [get, set]
 
byte?[] SecretAppend [get, set]
 
byte?[] SecretPrepend [get, set]
 
byte?[] Seed [get, set]
 
bool UseSecretAgreementAsHmacKey [get]
 
override ECDiffieHellmanPublicKey PublicKey [get]
 
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 ()
 
void ForceSetKeySize (int newKeySize)
 
void ProcessPkcs8Response (System.Security.Cryptography.CngPkcs8.Pkcs8Response response)
 
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 Exception DerivedClassMustOverride ()
 
static unsafe byte[] ExportArray< T > (ReadOnlySpan< T > password, PbeParameters pbeParameters, TryExportPbe< T > exporter)
 
static unsafe byte[] ExportArray (TryExport exporter)
 

Private Attributes

CngAlgorithmCore _core
 
CngAlgorithm _hashAlgorithm = CngAlgorithm.Sha256
 
ECDiffieHellmanKeyDerivationFunction _kdf
 
byte[] _hmacKey
 
byte[] _label
 
byte[] _secretAppend
 
byte[] _secretPrepend
 
byte[] _seed
 

Static Private Attributes

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

Detailed Description

Definition at line 6 of file ECDiffieHellmanCng.cs.


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