Skip to content

Commit 11db183

Browse files
bartonjsRon Petrusha
authored andcommitted
Use "When overridden" on AsymmetricAlgorithm virtual+throws (#2861)
1 parent f14338b commit 11db183

File tree

1 file changed

+47
-10
lines changed

1 file changed

+47
-10
lines changed

xml/System.Security.Cryptography/AsymmetricAlgorithm.xml

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@
661661
<param name="passwordBytes">The bytes to use as a password when decrypting the key material.</param>
662662
<param name="source">The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding.</param>
663663
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source"/>. This parameter is treated as uninitialized.</param>
664-
<summary>Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object.</summary>
664+
<summary>When overridden in a derived class, imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object.</summary>
665665
<remarks>
666666
<format type="text/markdown"><![CDATA[
667667
@@ -671,6 +671,9 @@
671671
672672
This method only supports the binary (BER/CER/DER) encoding of EncryptedPrivateKeyInfo.
673673
If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.
674+
675+
Because algorithm-specific support is required to interpret the contents of this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
676+
674677
]]></format>
675678
</remarks>
676679
<exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
@@ -695,6 +698,7 @@ The contents of <paramref name="source"/> represent the key in a format that is
695698

696699
The algorithm-specific key import failed.
697700
</exception>
701+
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
698702
</Docs>
699703
</Member>
700704
<Member MemberName="ImportEncryptedPkcs8PrivateKey">
@@ -727,7 +731,7 @@ The algorithm-specific key import failed.
727731
<param name="password">The password to use for decrypting the key material.</param>
728732
<param name="source">The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding.</param>
729733
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source"/>. This parameter is treated as uninitialized.</param>
730-
<summary>Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object.</summary>
734+
<summary>When overridden in a derived class, imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object.</summary>
731735
<remarks>
732736
<format type="text/markdown"><![CDATA[
733737
@@ -736,6 +740,9 @@ The algorithm-specific key import failed.
736740
737741
This method only supports the binary (BER/CER/DER) encoding of EncryptedPrivateKeyInfo.
738742
If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.
743+
744+
Because algorithm-specific support is required to interpret the contents of this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.ImportEncryptedPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
745+
739746
]]></format>
740747
</remarks>
741748
<exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
@@ -756,6 +763,7 @@ The contents of <paramref name="source"/> represent the key in a format that is
756763

757764
The algorithm-specific key import failed.
758765
</exception>
766+
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
759767
</Docs>
760768
</Member>
761769
<Member MemberName="ImportPkcs8PrivateKey">
@@ -786,13 +794,16 @@ The algorithm-specific key import failed.
786794
<Docs>
787795
<param name="source">The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding.</param>
788796
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source"/>. This parameter is treated as uninitialized.</param>
789-
<summary>Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object.</summary>
797+
<summary>When overriden in a derived class, imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object.</summary>
790798
<remarks>
791799
<format type="text/markdown"><![CDATA[
792800
793801
## Remarks
794802
This method only supports the binary (BER/CER/DER) encoding of PrivateKeyInfo.
795803
If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.
804+
805+
Because algorithm-specific support is required to interpret the contents of this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.ImportPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
806+
796807
]]></format>
797808
</remarks>
798809
<exception cref="T:System.Security.Cryptography.CryptographicException">The contents of <paramref name="source"/> do not represent an ASN.1-BER-encoded PKCS#8 PrivateKeyInfo structure.
@@ -809,6 +820,7 @@ The contents of <paramref name="source"/> represent the key in a format that is
809820

810821
The algorithm-specific key import failed.
811822
</exception>
823+
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
812824
</Docs>
813825
</Member>
814826
<Member MemberName="ImportSubjectPublicKeyInfo">
@@ -839,13 +851,15 @@ The algorithm-specific key import failed.
839851
<Docs>
840852
<param name="source">The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.</param>
841853
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source"/>. This parameter is treated as uninitialized.</param>
842-
<summary>Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object.</summary>
854+
<summary>When overriden in a derived class, imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object.</summary>
843855
<remarks>
844856
<format type="text/markdown"><![CDATA[
845857
846858
## Remarks
847859
This method only supports the binary (DER) encoding of SubjectPublicKeyInfo.
848860
If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.
861+
862+
Because algorithm-specific support is required to interpret the contents of this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.ImportSubjectPublicKeyInfo%2A> throws a <xref:System.NotImplementedException> by default.
849863
]]></format>
850864
</remarks>
851865
<exception cref="T:System.Security.Cryptography.CryptographicException">The contents of <paramref name="source"/> do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure.
@@ -862,6 +876,7 @@ The contents of <paramref name="source"/> represent the key in a format that is
862876

863877
The algorithm-specific key import failed.
864878
</exception>
879+
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
865880
</Docs>
866881
</Member>
867882
<Member MemberName="KeyExchangeAlgorithm">
@@ -1270,7 +1285,7 @@ This member is an explicit interface member implementation. It can be used only
12701285
<param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
12711286
<param name="destination">The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data.</param>
12721287
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination"/>. This parameter is treated as uninitialized.</param>
1273-
<summary>Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password.</summary>
1288+
<summary>When overridden in a derived class, attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password.</summary>
12741289
<returns><see langword="true"/> if <paramref name="destination"/> is big enough to receive the output; otherwise, <see langword="false"/>.</returns>
12751290
<remarks>
12761291
<format type="text/markdown"><![CDATA[
@@ -1279,6 +1294,8 @@ This member is an explicit interface member implementation. It can be used only
12791294
The password bytes are passed directly into the Key Derivation Function (KDF) used by the algorithm indicated by `pbeParameters`.
12801295
This enables compatibility with other systems which use a text encoding other than UTF-8 when processing passwords with PBKDF2 (Password-Based Key Derivation Function 2).
12811296
1297+
Because algorithm-specific support is required to produce this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
1298+
12821299
]]></format>
12831300
</remarks>
12841301
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.
@@ -1287,6 +1304,7 @@ This member is an explicit interface member implementation. It can be used only
12871304

12881305
<paramref name="pbeParameters"/> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12"/> should be used, which requires <see cref="T:System.Char"/>-based passwords.
12891306
</exception>
1307+
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
12901308
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey" />
12911309
</Docs>
12921310
</Member>
@@ -1321,17 +1339,20 @@ This member is an explicit interface member implementation. It can be used only
13211339
<param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
13221340
<param name="destination">The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data.</param>
13231341
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination"/>. This parameter is treated as uninitialized.</param>
1324-
<summary>Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password.</summary>
1342+
<summary>When overriden in a derived class, attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password.</summary>
13251343
<returns><see langword="true"/> if <paramref name="destination"/> is big enough to receive the output; otherwise, <see langword="false"/>.</returns>
13261344
<remarks>
13271345
<format type="text/markdown"><![CDATA[
13281346
13291347
## Remarks
13301348
When `pbeParameters` indicates an algorithm that uses PBKDF2 (Password-Based Key Derivation Function 2), the password is converted to bytes via the UTF-8 encoding.
13311349
1350+
Because algorithm-specific support is required to produce this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.TryExportEncryptedPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
1351+
13321352
]]></format>
13331353
</remarks>
13341354
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
1355+
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
13351356
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.ExportEncryptedPkcs8PrivateKey" />
13361357
</Docs>
13371358
</Member>
@@ -1363,10 +1384,18 @@ This member is an explicit interface member implementation. It can be used only
13631384
<Docs>
13641385
<param name="destination">The byte span to receive the PKCS#8 PrivateKeyInfo data.</param>
13651386
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination"/>. This parameter is treated as uninitialized.</param>
1366-
<summary>Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer.</summary>
1387+
<summary>When overridden in a derived class, attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer.</summary>
13671388
<returns><see langword="true"/> if <paramref name="destination"/> is big enough to receive the output; otherwise, <see langword="false"/>.</returns>
1368-
<remarks>To be added.</remarks>
1389+
<remarks>
1390+
<format type="text/markdown"><![CDATA[
1391+
1392+
## Remarks
1393+
Because algorithm-specific support is required to produce this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.TryExportPkcs8PrivateKey%2A> throws a <xref:System.NotImplementedException> by default.
1394+
1395+
]]></format>
1396+
</remarks>
13691397
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
1398+
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
13701399
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.ExportPkcs8PrivateKey" />
13711400
</Docs>
13721401
</Member>
@@ -1398,10 +1427,18 @@ This member is an explicit interface member implementation. It can be used only
13981427
<Docs>
13991428
<param name="destination">The byte span to receive the X.509 SubjectPublicKeyInfo data.</param>
14001429
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination"/>. This parameter is treated as uninitialized.</param>
1401-
<summary>Attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer.</summary>
1430+
<summary>When overridden in a derived class, attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer.</summary>
14021431
<returns><see langword="true"/> if <paramref name="destination"/> is big enough to receive the output; otherwise, <see langword="false"/>.</returns>
1403-
<remarks>To be added.</remarks>
1432+
<remarks>
1433+
<format type="text/markdown"><![CDATA[
1434+
1435+
## Remarks
1436+
Because algorithm-specific support is required to produce this data format, <xref:System.Security.Cryptography.AsymmetricAlgorithm.TryExportSubjectPublicKeyInfo%2A> throws a <xref:System.NotImplementedException> by default.
1437+
1438+
]]></format>
1439+
</remarks>
14041440
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
1441+
<exception cref="T:System.NotImplementedException">A derived type has not overriden this member.</exception>
14051442
<altmember cref="Overload:System.Security.Cryptography.AsymmetricAlgorithm.ExportSubjectPublicKeyInfo" />
14061443
</Docs>
14071444
</Member>

0 commit comments

Comments
 (0)