20 [Obsolete(
"PublicKey.Key is obsolete. Use the appropriate method to get the public key, such as GetRSAPublicKey.", DiagnosticId =
"SYSLIB0027", UrlFormat =
"https://aka.ms/dotnet-warnings/{0}")]
28 if (!(
value ==
"1.2.840.113549.1.1.1") && !(
value ==
"1.2.840.10040.4.1"))
49 byte[]
array =
key.ExportSubjectPublicKeyInfo();
73 return new PublicKey(oid, parameters, keyValue);
95 [UnsupportedOSPlatform(
"ios")]
96 [UnsupportedOSPlatform(
"tvos")]
145 return eCDiffieHellman;
159 Algorithm = (_oid.Value ??
string.Empty),
165 subjectPublicKeyInfoAsn2.
Encode(asnWriter);
179 length = reader.PeekEncodedValue().Length;
static string Cryptography_Der_Invalid_Encoding
static string NotSupported_KeyAlgorithm
override void ImportSubjectPublicKeyInfo(ReadOnlySpan< byte > source, out int bytesRead)
static new? DSA Create(string algName)
override void ImportSubjectPublicKeyInfo(ReadOnlySpan< byte > source, out int bytesRead)
static new? ECDiffieHellman Create(string algorithm)
static new? ECDsa Create(string algorithm)
override void ImportSubjectPublicKeyInfo(ReadOnlySpan< byte > source, out int bytesRead)
static new? RSA Create(string algName)
unsafe override void ImportSubjectPublicKeyInfo(ReadOnlySpan< byte > source, out int bytesRead)
bool TryExportSubjectPublicKeyInfo(Span< byte > destination, out int bytesWritten)
AsnWriter EncodeSubjectPublicKeyInfo()
static PublicKey CreateFromSubjectPublicKeyInfo(ReadOnlySpan< byte > source, out int bytesRead)
ECDiffieHellman? GetECDiffieHellmanPublicKey()
static unsafe int DecodeSubjectPublicKeyInfo(ReadOnlySpan< byte > source, out Oid oid, out AsnEncodedData parameters, out AsnEncodedData keyValue)
byte[] ExportSubjectPublicKeyInfo()
AsnEncodedData EncodedParameters
ECDsa? GetECDsaPublicKey()
PublicKey(AsymmetricAlgorithm key)
PublicKey(Oid oid, AsnEncodedData parameters, AsnEncodedData keyValue)
AsnEncodedData EncodedKeyValue
ReadOnlyMemory< byte >? Parameters
static void Decode(ref AsnValueReader reader, ReadOnlyMemory< byte > rebind, out SubjectPublicKeyInfoAsn decoded)
ReadOnlyMemory< byte > SubjectPublicKey
void Encode(AsnWriter writer)
AlgorithmIdentifierAsn Algorithm