Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Security.​Cryptography.​DSACryptoServiceProvider
Assembly: System.Security.Cryptography
Inheritance: object → AsymmetricAlgorithm → DSA → DSACryptoServiceProvider
Implemented Interfaces
- IDisposable Implemented by: AsymmetricAlgorithm
- ICspAsymmetricAlgorithm
Defines a wrapper object to access the cryptographic service provider (CSP) implementation of the <see cref="T:System.Security.Cryptography.DSA" /> algorithm. This class cannot be inherited.
Fields and Constants
protected
int
KeySizeValue
Represents the size, in bits, of the key modulus used by the asymmetric algorithm.
protected
KeySizes[]
LegalKeySizesValue
Specifies the key sizes that are supported by the asymmetric algorithm.
Properties
public
CspKeyContainerInfo
CspKeyContainerInfo
Gets a <see cref="T:System.Security.Cryptography.CspKeyContainerInfo" /> object that describes additional information about a cryptographic key pair.
public
string
KeyExchangeAlgorithm
Gets the name of the key exchange algorithm.
public
int
KeySize
Gets the size of the key used by the asymmetric algorithm in bits.
public
KeySizes[]
LegalKeySizes
Gets the key sizes that are supported by the asymmetric algorithm.
public
bool
PersistKeyInCsp
Gets or sets a value indicating whether the key should be persisted in the cryptographic service provider (CSP).
public
bool
PublicOnly
Gets a value that indicates whether the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object contains only a public key.
public
string
SignatureAlgorithm
Gets the name of the signature algorithm.
public static
bool
UseMachineKeyStore
Gets or sets a value indicating whether the key should be persisted in the computer's key store instead of the user profile store.
Methods
public
byte[]
CreateSignature​(byte[] rgbHash)
Creates the <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.
Returns The digital signature for the specified data.
rgbHash
The data to be signed.
protected
void
Dispose​(bool disposing)
public
byte[]
ExportCspBlob​(bool includePrivateParameters)
Exports a blob containing the key information associated with a <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object.
Returns A byte array containing the key information associated with a <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object.
includePrivateParameters
<see langword="true" /> to include the private key; otherwise, <see langword="false" /> .
public
DSAParameters
ExportParameters​(bool includePrivateParameters)
Exports the <see cref="T:System.Security.Cryptography.DSAParameters" /> .
Returns The parameters for <see cref="T:System.Security.Cryptography.DSA" /> .
includePrivateParameters
<see langword="true" /> to include private parameters; otherwise, <see langword="false" /> .
protected
byte[]
HashData​(byte[] data,
int offset,
int count,
HashAlgorithmName hashAlgorithm)
protected
byte[]
HashData​(IO.​Stream data,
HashAlgorithmName hashAlgorithm)
public
void
ImportCspBlob​(byte[] keyBlob)
Imports a blob that represents DSA key information.
keyBlob
A byte array that represents a DSA key blob.
public
void
ImportEncryptedPkcs8PrivateKey​(ReadOnlySpan<​byte> passwordBytes,
ReadOnlySpan<​byte> source,
Int32& bytesRead)
public
void
ImportEncryptedPkcs8PrivateKey​(ReadOnlySpan<​char> password,
ReadOnlySpan<​byte> source,
Int32& bytesRead)
public
void
ImportParameters​(DSAParameters parameters)
Imports the specified <see cref="T:System.Security.Cryptography.DSAParameters" /> .
parameters
The parameters for <see cref="T:System.Security.Cryptography.DSA" /> .
public
byte[]
SignData​(byte[] buffer)
Computes the hash value of the specified byte array and signs the resulting hash value.
Returns The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.
buffer
The input data for which to compute the hash.
public
byte[]
SignData​(byte[] buffer,
int offset,
int count)
Signs a byte array from the specified start point to the specified end point.
Returns The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.
buffer
The input data to sign.
offset
The offset into the array from which to begin using data.
count
The number of bytes in the array to use as data.
public
byte[]
SignData​(IO.​Stream inputStream)
Computes the hash value of the specified input stream and signs the resulting hash value.
Returns The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.
inputStream
The input data for which to compute the hash.
public
byte[]
SignHash​(byte[] rgbHash,
string str)
Computes the signature for the specified hash value by encrypting it with the private key.
Returns The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified hash value.
rgbHash
The hash value of the data to be signed.
str
The name of the hash algorithm used to create the hash value of the data.
public
bool
VerifyData​(byte[] rgbData,
byte[] rgbSignature)
Verifies the specified signature data by comparing it to the signature computed for the specified data.
Returns <see langword="true" /> if the signature verifies as valid; otherwise, <see langword="false" /> .
rgbData
The data that was signed.
rgbSignature
The signature data to be verified.
public
bool
VerifyHash​(byte[] rgbHash,
string str,
byte[] rgbSignature)
Verifies the specified signature data by comparing it to the signature computed for the specified hash value.
Returns <see langword="true" /> if the signature verifies as valid; otherwise, <see langword="false" /> .
rgbHash
The hash value of the data to be signed.
str
The name of the hash algorithm used to create the hash value of the data.
rgbSignature
The signature data to be verified.
public
bool
VerifySignature​(byte[] rgbHash,
byte[] rgbSignature)
Verifies the <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.
Returns <see langword="true" /> if <paramref name="rgbSignature" /> matches the signature computed using the specified hash algorithm and key on <paramref name="rgbHash" /> ; otherwise, <see langword="false" /> .
rgbHash
The data signed with <paramref name="rgbSignature" /> .
rgbSignature
The signature to be verified for <paramref name="rgbHash" /> .
public
byte[]
CreateSignature​(byte[] rgbHash,
DSASignatureFormat signatureFormat)
Inherited from DSA
Creates the DSA signature for the specified hash value in the indicated format.
Returns The DSA signature for the specified data.
rgbHash
The hash value to sign.
signatureFormat
The encoding format to use for the signature.
protected
byte[]
CreateSignatureCore​(ReadOnlySpan<​byte> hash,
DSASignatureFormat signatureFormat)
Inherited from DSA
Creates the DSA signature for the specified hash value in the indicated format.
Returns The DSA signature for the specified data.
hash
The hash value to sign.
signatureFormat
The encoding format to use for the signature.
public
void
FromXmlString​(string xmlString)
Inherited from DSA
Reconstructs a <see cref="T:System.Security.Cryptography.DSA" /> object from an XML string.
xmlString
The XML string to use to reconstruct the <see cref="T:System.Security.Cryptography.DSA" /> object.
public
int
GetMaxSignatureSize​(DSASignatureFormat signatureFormat)
Inherited from DSA
Gets the largest size, in bytes, for a signature produced by this key in the indicated format.
Returns The largest size, in bytes, for a signature produced by this key in the indicated format.
signatureFormat
The encoding format for a signature.
public
void
ImportFromEncryptedPem​(ReadOnlySpan<​char> input,
ReadOnlySpan<​byte> passwordBytes)
Inherited from DSA
Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object.
input
The PEM text of the encrypted key to import.
passwordBytes
The bytes to use as a password when decrypting the key material.
public
void
ImportFromEncryptedPem​(ReadOnlySpan<​char> input,
ReadOnlySpan<​char> password)
Inherited from DSA
Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object.
input
The PEM text of the encrypted key to import.
password
The password to use for decrypting the key material.
public
void
ImportFromPem​(ReadOnlySpan<​char> input)
Inherited from DSA
Imports an RFC 7468 PEM-encoded key, replacing the keys for this object.
input
The PEM text of the key to import.
public
void
ImportPkcs8PrivateKey​(ReadOnlySpan<​byte> source,
Int32& bytesRead)
Inherited from DSA
public
void
ImportSubjectPublicKeyInfo​(ReadOnlySpan<​byte> source,
Int32& bytesRead)
Inherited from DSA
public
byte[]
SignData​(byte[] data,
int offset,
int count,
HashAlgorithmName hashAlgorithm)
Inherited from DSA
Computes the hash value of a portion of the specified byte array using the specified hash algorithm and signs the resulting hash value.
Returns The DSA signature for the specified data.
data
The input data for which to compute the hash.
offset
The offset into the array at which to begin using data.
count
The number of bytes in the array to use as data.
hashAlgorithm
The hash algorithm to use to create the hash value.
public
byte[]
SignData​(byte[] data,
int offset,
int count,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Computes the hash value of the specified data and signs it using the specified signature format.
Returns The DSA signature for the specified data.
data
The data to sign.
offset
The offset into <paramref name="data" /> at which to begin hashing.
count
The number of bytes to read from <paramref name="data" /> .
hashAlgorithm
The hash algorithm to use to create the hash value.
signatureFormat
The encoding format to use for the signature.
public
byte[]
SignData​(byte[] data,
HashAlgorithmName hashAlgorithm)
Inherited from DSA
Computes the hash value of the specified byte array using the specified hash algorithm and signs the resulting hash value.
Returns The DSA signature for the specified data.
data
The input data for which to compute the hash.
hashAlgorithm
The hash algorithm to use to create the hash value.
public
byte[]
SignData​(byte[] data,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Computes the hash value of the specified data and signs it using the specified signature format.
Returns The DSA signature for the specified data.
data
The data to sign.
hashAlgorithm
The hash algorithm to use to create the hash value.
signatureFormat
The encoding format to use for the signature.
public
byte[]
SignData​(IO.​Stream data,
HashAlgorithmName hashAlgorithm)
Inherited from DSA
Computes the hash value of the specified stream using the specified hash algorithm and signs the resulting hash value.
Returns The DSA signature for the specified data.
data
The input stream for which to compute the hash.
hashAlgorithm
The hash algorithm to use to create the hash value.
public
byte[]
SignData​(IO.​Stream data,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Computes the hash value of the specified data and signs it using the specified signature format.
Returns The DSA signature for the specified data.
data
The data to sign.
hashAlgorithm
The hash algorithm to use to create the hash value.
signatureFormat
The encoding format to use for the signature.
protected
byte[]
SignDataCore​(IO.​Stream data,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Computes the hash value of the specified data and signs it using the specified signature format.
Returns The DSA signature for the specified data.
data
The data to sign.
hashAlgorithm
The hash algorithm to use to create the hash value.
signatureFormat
The encoding format to use for the signature.
protected
byte[]
SignDataCore​(ReadOnlySpan<​byte> data,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Computes the hash value of the specified data and signs it using the specified signature format.
Returns The DSA signature for the specified data.
data
The data to sign.
hashAlgorithm
The hash algorithm to use to create the hash value.
signatureFormat
The encoding format to use for the signature.
public
string
ToXmlString​(bool includePrivateParameters)
Inherited from DSA
Creates and returns an XML string representation of the current <see cref="T:System.Security.Cryptography.DSA" /> object.
Returns An XML string encoding of the current <see cref="T:System.Security.Cryptography.DSA" /> object.
includePrivateParameters
<see langword="true" /> to include private parameters; otherwise, <see langword="false" /> .
public
bool
TryCreateSignature​(ReadOnlySpan<​byte> hash,
Span<​byte> destination,
Int32& bytesWritten)
Inherited from DSA
public
bool
TryCreateSignature​(ReadOnlySpan<​byte> hash,
Span<​byte> destination,
DSASignatureFormat signatureFormat,
Int32& bytesWritten)
Inherited from DSA
protected
bool
TryCreateSignatureCore​(ReadOnlySpan<​byte> hash,
Span<​byte> destination,
DSASignatureFormat signatureFormat,
Int32& bytesWritten)
Inherited from DSA
public
bool
TryExportEncryptedPkcs8PrivateKey​(ReadOnlySpan<​byte> passwordBytes,
PbeParameters pbeParameters,
Span<​byte> destination,
Int32& bytesWritten)
Inherited from DSA
public
bool
TryExportEncryptedPkcs8PrivateKey​(ReadOnlySpan<​char> password,
PbeParameters pbeParameters,
Span<​byte> destination,
Int32& bytesWritten)
Inherited from DSA
public
bool
TryExportPkcs8PrivateKey​(Span<​byte> destination,
Int32& bytesWritten)
Inherited from DSA
public
bool
TryExportSubjectPublicKeyInfo​(Span<​byte> destination,
Int32& bytesWritten)
Inherited from DSA
protected
bool
TryHashData​(ReadOnlySpan<​byte> data,
Span<​byte> destination,
HashAlgorithmName hashAlgorithm,
Int32& bytesWritten)
Inherited from DSA
public
bool
TrySignData​(ReadOnlySpan<​byte> data,
Span<​byte> destination,
HashAlgorithmName hashAlgorithm,
Int32& bytesWritten)
Inherited from DSA
public
bool
TrySignData​(ReadOnlySpan<​byte> data,
Span<​byte> destination,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat,
Int32& bytesWritten)
Inherited from DSA
protected
bool
TrySignDataCore​(ReadOnlySpan<​byte> data,
Span<​byte> destination,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat,
Int32& bytesWritten)
Inherited from DSA
public
bool
VerifyData​(byte[] data,
byte[] signature,
HashAlgorithmName hashAlgorithm)
Inherited from DSA
Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and comparing it to the provided signature.
Returns <see langword="true" /> if the digital signature is valid; otherwise, <see langword="false" /> .
data
The signed data.
signature
The signature data to be verified.
hashAlgorithm
The hash algorithm used to create the hash value of the data.
public
bool
VerifyData​(byte[] data,
byte[] signature,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Verifies that a digital signature is valid for the provided data.
Returns <see langword="true" /> if the digital signature is valid for the provided data; otherwise, <see langword="false" /> .
data
The signed data.
signature
The signature to verify.
hashAlgorithm
The hash algorithm used to hash the data for the verification process.
signatureFormat
The encoding format for <paramref name="signature" /> .
public
bool
VerifyData​(byte[] data,
int offset,
int count,
byte[] signature,
HashAlgorithmName hashAlgorithm)
Inherited from DSA
Verifies that a digital signature is valid by calculating the hash value of the data in a portion of a byte array using the specified hash algorithm and comparing it to the provided signature.
Returns <see langword="true" /> if the digital signature is valid; otherwise, <see langword="false" /> .
data
The signed data.
offset
The starting index at which to compute the hash.
count
The number of bytes to hash.
signature
The signature data to be verified.
hashAlgorithm
The hash algorithm used to create the hash value of the data.
public
bool
VerifyData​(byte[] data,
int offset,
int count,
byte[] signature,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Verifies that a digital signature is valid for the provided data.
Returns <see langword="true" /> if the digital signature is valid for the provided data; otherwise, <see langword="false" /> .
data
An array that contains the signed data.
offset
The starting index of the signed portion of <paramref name="data" /> .
count
The number of bytes in <paramref name="data" /> that were signed.
signature
The signature to verify.
hashAlgorithm
The hash algorithm used to hash the data for the verification process.
signatureFormat
The encoding format for <paramref name="signature" /> .
public
bool
VerifyData​(IO.​Stream data,
byte[] signature,
HashAlgorithmName hashAlgorithm)
Inherited from DSA
Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and comparing it to the provided signature.
Returns <see langword="true" /> if the digital signature is valid; otherwise, <see langword="false" /> .
data
The signed data.
signature
The signature data to be verified.
hashAlgorithm
The hash algorithm used to create the hash value of the data.
public
bool
VerifyData​(IO.​Stream data,
byte[] signature,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Verifies that a digital signature is valid for the provided data.
Returns <see langword="true" /> if the digital signature is valid for the provided data; otherwise, <see langword="false" /> .
data
The signed data.
signature
The signature to verify.
hashAlgorithm
The hash algorithm used to hash the data for the verification process.
signatureFormat
The encoding format for <paramref name="signature" /> .
public
bool
VerifyData​(ReadOnlySpan<​byte> data,
ReadOnlySpan<​byte> signature,
HashAlgorithmName hashAlgorithm)
Inherited from DSA
Verifies that a digital signature is valid by calculating the hash value of the data in a byte span using the specified hash algorithm and comparing it to the provided signature.
Returns <see langword="true" /> if the digital signature is valid; otherwise, <see langword="false" /> .
data
The signed data.
signature
The signature to be verified.
hashAlgorithm
The hash algorithm used to create the hash value of the data.
public
bool
VerifyData​(ReadOnlySpan<​byte> data,
ReadOnlySpan<​byte> signature,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Verifies that a digital signature is valid for the provided data.
Returns <see langword="true" /> if the digital signature is valid for the provided data; otherwise, <see langword="false" /> .
data
The signed data.
signature
The signature to verify.
hashAlgorithm
The hash algorithm used to hash the data for the verification process.
signatureFormat
The encoding format for <paramref name="signature" /> .
protected
bool
VerifyDataCore​(IO.​Stream data,
ReadOnlySpan<​byte> signature,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Verifies that a digital signature is valid for the provided data.
Returns <see langword="true" /> if the digital signature is valid for the provided data; otherwise, <see langword="false" /> .
data
The signed data.
signature
The signature to verify.
hashAlgorithm
The hash algorithm used to hash the data for the verification process.
signatureFormat
The encoding format for <paramref name="signature" /> .
protected
bool
VerifyDataCore​(ReadOnlySpan<​byte> data,
ReadOnlySpan<​byte> signature,
HashAlgorithmName hashAlgorithm,
DSASignatureFormat signatureFormat)
Inherited from DSA
Verifies that a digital signature is valid for the provided data.
Returns <see langword="true" /> if the digital signature is valid for the provided data; otherwise, <see langword="false" /> .
data
The signed data.
signature
The signature to verify.
hashAlgorithm
The hash algorithm used to hash the data for the verification process.
signatureFormat
The encoding format for <paramref name="signature" /> .
public
bool
VerifySignature​(byte[] rgbHash,
byte[] rgbSignature,
DSASignatureFormat signatureFormat)
Inherited from DSA
Verifies that a digital signature is valid for the provided hash.
Returns <see langword="true" /> if the digital signature is valid for the provided data; otherwise, <see langword="false" /> .
rgbHash
The signed hash.
rgbSignature
The signature to verify.
signatureFormat
The encoding format for <paramref name="rgbSignature" /> .
public
bool
VerifySignature​(ReadOnlySpan<​byte> hash,
ReadOnlySpan<​byte> signature)
Inherited from DSA
Verifies that a digital signature is valid for a provided data hash.
Returns <see langword="true" /> if the digital signature is valid for the hash; otherwise, <see langword="false" /> .
hash
The data hash to verify.
signature
The signature to be verify.
public
bool
VerifySignature​(ReadOnlySpan<​byte> hash,
ReadOnlySpan<​byte> signature,
DSASignatureFormat signatureFormat)
Inherited from DSA
Verifies that a digital signature is valid for the provided hash.
Returns <see langword="true" /> if the digital signature is valid for the provided data; otherwise, <see langword="false" /> .
hash
The signed hash.
signature
The signature to verify.
signatureFormat
The encoding format for <paramref name="signature" /> .
protected
bool
VerifySignatureCore​(ReadOnlySpan<​byte> hash,
ReadOnlySpan<​byte> signature,
DSASignatureFormat signatureFormat)
Inherited from DSA
Verifies that a digital signature is valid for the provided hash.
Returns <see langword="true" /> if the digital signature is valid for the provided data; otherwise, <see langword="false" /> .
hash
The signed hash.
signature
The signature to verify.
signatureFormat
The encoding format for <paramref name="signature" /> .
public
void
Clear​()
Inherited from AsymmetricAlgorithm
Releases all resources used by the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> class.
public
void
Dispose​()
Inherited from AsymmetricAlgorithm
Releases all resources used by the current instance of the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> class.
public
byte[]
ExportEncryptedPkcs8PrivateKey​(ReadOnlySpan<​byte> passwordBytes,
PbeParameters pbeParameters)
Inherited from AsymmetricAlgorithm
Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password.
Returns A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key.
passwordBytes
The bytes to use as a password when encrypting the key material.
pbeParameters
The password-based encryption (PBE) parameters to use when encrypting the key material.
public
byte[]
ExportEncryptedPkcs8PrivateKey​(ReadOnlySpan<​char> password,
PbeParameters pbeParameters)
Inherited from AsymmetricAlgorithm
Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password.
Returns A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key.
password
The password to use when encrypting the key material.
pbeParameters
The password-based encryption (PBE) parameters to use when encrypting the key material.
public
string
ExportEncryptedPkcs8PrivateKeyPem​(ReadOnlySpan<​byte> passwordBytes,
PbeParameters pbeParameters)
Inherited from AsymmetricAlgorithm
Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password, PEM encoded.
Returns A string containing the PEM-encoded PKCS#8 EncryptedPrivateKeyInfo.
passwordBytes
The bytes to use as a password when encrypting the key material.
pbeParameters
The password-based encryption (PBE) parameters to use when encrypting the key material.
public
string
ExportEncryptedPkcs8PrivateKeyPem​(ReadOnlySpan<​char> password,
PbeParameters pbeParameters)
Inherited from AsymmetricAlgorithm
Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password, PEM encoded.
Returns A string containing the PEM-encoded PKCS#8 EncryptedPrivateKeyInfo.
password
The password to use when encrypting the key material.
pbeParameters
The password-based encryption (PBE) parameters to use when encrypting the key material.
public
byte[]
ExportPkcs8PrivateKey​()
Inherited from AsymmetricAlgorithm
Exports the current key in the PKCS#8 PrivateKeyInfo format.
Returns A byte array containing the PKCS#8 PrivateKeyInfo representation of this key.
public
string
ExportPkcs8PrivateKeyPem​()
Inherited from AsymmetricAlgorithm
Exports the current key in the PKCS#8 PrivateKeyInfo format, PEM encoded.
Returns A string containing the PEM-encoded PKCS#8 PrivateKeyInfo.
public
byte[]
ExportSubjectPublicKeyInfo​()
Inherited from AsymmetricAlgorithm
Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format.
Returns A byte array containing the X.509 SubjectPublicKeyInfo representation of the public-key portion of this key.
public
string
ExportSubjectPublicKeyInfoPem​()
Inherited from AsymmetricAlgorithm
Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format, PEM encoded.
Returns A string containing the PEM-encoded X.509 SubjectPublicKeyInfo.
public
bool
TryExportEncryptedPkcs8PrivateKeyPem​(ReadOnlySpan<​byte> passwordBytes,
PbeParameters pbeParameters,
Span<​char> destination,
Int32& charsWritten)
Inherited from AsymmetricAlgorithm
public
bool
TryExportEncryptedPkcs8PrivateKeyPem​(ReadOnlySpan<​char> password,
PbeParameters pbeParameters,
Span<​char> destination,
Int32& charsWritten)
Inherited from AsymmetricAlgorithm
public
bool
TryExportPkcs8PrivateKeyPem​(Span<​char> destination,
Int32& charsWritten)
Inherited from AsymmetricAlgorithm
public
bool
TryExportSubjectPublicKeyInfoPem​(Span<​char> destination,
Int32& charsWritten)
Inherited from AsymmetricAlgorithm
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object