From 77b61cdfbfc6b9ada32290f4554de18ce3dd4e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20L=C3=B3pez?= <1175054+carlossanlop@users.noreply.github.com> Date: Thu, 17 Aug 2023 17:10:52 -0700 Subject: [PATCH] Port System.Security documentation (#9191) * Port System.Security documentation * Add missing APIs (their docs were found in the obj folder) * seealso -> see --- ...509AuthorityInformationAccessExtension.xml | 616 +- .../X509AuthorityKeyIdentifierExtension.xml | 1090 +-- .../X509SubjectAlternativeNameExtension.xml | 368 +- xml/System.Security.Cryptography/AesGcm.xml | 1311 +-- .../AsymmetricAlgorithm.xml | 4921 +++++----- .../AuthenticationTagMismatchException.xml | 186 +- .../CryptoStream.xml | 3856 ++++---- xml/System.Security.Cryptography/DSACng.xml | 2111 ++--- .../DSACryptoServiceProvider.xml | 3696 ++++---- .../ECDiffieHellman.xml | 4069 ++++----- .../ECDiffieHellmanCng.xml | 4335 ++++----- xml/System.Security.Cryptography/ECDsaCng.xml | 4143 ++++----- .../HMACSHA3_256.xml | 1416 +-- .../HMACSHA3_384.xml | 1416 +-- .../HMACSHA3_512.xml | 1416 +-- .../HashAlgorithmName.xml | 1760 ++-- xml/System.Security.Cryptography/RSA.xml | 7952 +++++++++-------- xml/System.Security.Cryptography/RSACng.xml | 2979 +++--- .../RSACryptoServiceProvider.xml | 5212 +++++------ .../RSAEncryptionPadding.xml | 1771 ++-- .../RandomNumberGenerator.xml | 2286 ++--- xml/System.Security.Cryptography/SHA3_256.xml | 821 +- xml/System.Security.Cryptography/SHA3_384.xml | 819 +- xml/System.Security.Cryptography/SHA3_512.xml | 819 +- .../SP800108HmacCounterKdf.xml | 1205 +-- .../SafeEvpPKeyHandle.xml | 878 +- xml/System.Security.Cryptography/Shake128.xml | 1031 ++- xml/System.Security.Cryptography/Shake256.xml | 1031 ++- 28 files changed, 32115 insertions(+), 31399 deletions(-) diff --git a/xml/System.Security.Cryptography.X509Certificates/X509AuthorityInformationAccessExtension.xml b/xml/System.Security.Cryptography.X509Certificates/X509AuthorityInformationAccessExtension.xml index 5b901fea628..e35e932e286 100644 --- a/xml/System.Security.Cryptography.X509Certificates/X509AuthorityInformationAccessExtension.xml +++ b/xml/System.Security.Cryptography.X509Certificates/X509AuthorityInformationAccessExtension.xml @@ -1,308 +1,308 @@ - - - - - - - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.X509Certificates.X509Extension - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - Represents the Authority Information Access X.509 Extension (1.3.6.1.5.5.7.1.1). - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - Initializes a new instance of the class. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - The encoded data used to create the extension. - - if the extension is critical; otherwise, . - Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. - To be added. - - is . - - did not decode as an Authority Information Access extension. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - - - - - The encoded data used to create the extension. - - if the extension is critical; otherwise, . - Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. - To be added. - - did not decode as an Authority Information Access extension. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })>] - - - - - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })>] - - - - - - - A collection of OCSP URI values to embed in the extension. - A collection of CAIssuers URI values to embed in the extension. - - if the extension is critical; otherwise, . - Initializes a new instance of the class from a collection of OCSP and CAIssuer values. - To be added. - Both and are - either or empty. - One of the values in or - contains characters outside of the International Alphabet 5 (IA5) character space - (which is equivalent to 7-bit US-ASCII). - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Collections.Generic.IEnumerable<System.String> - - - - Enumerates the AccessDescription values whose AccessMethod is CAIssuers (1.3.6.1.5.5.7.48.2) and content data type is URI. - The URIs corresponding to the locations for the issuing Certificate Authority certificate. - To be added. - The contents of the extension could not be decoded successfully. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Collections.Generic.IEnumerable<System.String> - - - - Enumerates the AccessDescription values whose AccessMethod is OCSP (1.3.6.1.5.5.7.48.1) and content data type is URI. - The URIs corresponding to the locations for the issuing Certificate Authority certificate. - To be added. - The contents of the extension could not be decoded successfully. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Collections.Generic.IEnumerable<System.String> - - - - - - The object identifier representing the access method for filtering. - Enumerates the AccessDescription values described in this extension, filtering the results to include only items using the specified access method and having a content data type of URI. - The URI-typed access location values that correspond to the requested access method. - - - - - is . - The property of the parameter is - or the empty string. - The contents of the extension could not be decoded successfully. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Collections.Generic.IEnumerable<System.String> - - - - - - The dotted-decimal form of the access method for filtering. - Enumerates the AccessDescription values described in this extension, filtering the results to include only items using the specified access method and having a content data type of URI. - The URI-typed access location values that correspond to the requested access method. - - - - - is . - The contents of the extension could not be decoded successfully. - - - - + + + + + + + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.X509Certificates.X509Extension + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Represents the Authority Information Access X.509 Extension (1.3.6.1.5.5.7.1.1). + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + Initializes a new instance of the class. + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + The encoded data used to create the extension. + + if the extension is critical; otherwise, . + Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. + To be added. + + is . + + did not decode as an Authority Information Access extension. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + + + + + The encoded data used to create the extension. + + if the extension is critical; otherwise, . + Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. + To be added. + + did not decode as an Authority Information Access extension. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })>] + + + + + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })>] + + + + + + + A collection of OCSP URI values to embed in the extension. + A collection of CAIssuers URI values to embed in the extension. + + if the extension is critical; otherwise, . + Initializes a new instance of the class from a collection of OCSP and CAIssuer values. + To be added. + Both and are + either or empty. + One of the values in or + contains characters outside of the International Alphabet 5 (IA5) character space + (which is equivalent to 7-bit US-ASCII). + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The to be copied. + Copies the extension properties of the specified object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Collections.Generic.IEnumerable<System.String> + + + + Enumerates the AccessDescription values whose AccessMethod is CAIssuers (1.3.6.1.5.5.7.48.2) and content data type is URI. + The URIs corresponding to the locations for the issuing Certificate Authority certificate. + To be added. + The contents of the extension could not be decoded successfully. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Collections.Generic.IEnumerable<System.String> + + + + Enumerates the AccessDescription values whose AccessMethod is OCSP (1.3.6.1.5.5.7.48.1) and content data type is URI. + The URIs corresponding to the locations for the issuing Certificate Authority certificate. + To be added. + The contents of the extension could not be decoded successfully. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Collections.Generic.IEnumerable<System.String> + + + + + + The object identifier representing the access method for filtering. + Enumerates the AccessDescription values described in this extension, filtering the results to include only items using the specified access method and having a content data type of URI. + The URI-typed access location values that correspond to the requested access method. + + + + + is . + The property of the parameter is + or the empty string. + The contents of the extension could not be decoded successfully. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Collections.Generic.IEnumerable<System.String> + + + + + + The dotted-decimal form of the access method for filtering. + Enumerates the AccessDescription values described in this extension, filtering the results to include only items using the specified access method and having a content data type of URI. + The URI-typed access location values that correspond to the requested access method. + + + + + is . + The contents of the extension could not be decoded successfully. + + + + diff --git a/xml/System.Security.Cryptography.X509Certificates/X509AuthorityKeyIdentifierExtension.xml b/xml/System.Security.Cryptography.X509Certificates/X509AuthorityKeyIdentifierExtension.xml index dcc5798ba42..59b6d2e4d3f 100644 --- a/xml/System.Security.Cryptography.X509Certificates/X509AuthorityKeyIdentifierExtension.xml +++ b/xml/System.Security.Cryptography.X509Certificates/X509AuthorityKeyIdentifierExtension.xml @@ -1,545 +1,545 @@ - - - - - - - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.X509Certificates.X509Extension - - - - Represents the Authority Key Identifier X.509 Extension (2.5.29.35). - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - Initializes a new instance of the class. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - - - - - The encoded data used to create the extension. - - if the extension is critical; otherwise, . - Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. - To be added. - - is . - - did not decode as an Authority Key Identifier extension. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - The encoded data used to create the extension. - - if the extension is critical; otherwise, . - Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. - To be added. - - did not decode as an Authority Key Identifier extension. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension - - - - - - - - The subject key identifier value from the Certificate Authority (CA) certificate that will sign this extension. - The issuer name value from the Certificate Authority (CA) certificate that will sign this extension. - The serial number value from the Certificate Authority (CA) certificate that will sign this extension. - Creates an that specifies the provided key identifier, issuer name and serial number. - The configured extension. - To be added. - - , or - is . - - is invalid because the leading 9 bits are either - all zero or all one. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - The subject key identifier value from the Certificate Authority (CA) certificate that will sign this extension. - The issuer name value from the Certificate Authority (CA) certificate that will sign this extension. - The serial number value from the Certificate Authority (CA) certificate that will sign this extension. - Creates an that specifies the provided key identifier, issuer name and serial number. - The configured extension. - To be added. - - is . - - is invalid because the leading 9 bits are either - all zero or all one. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension - - - - - - - - The Certificate Authority (CA) certificate that will sign this extension. - - to include the Subject Key Identifier value from the certificate as the key identifier value in this extension; otherwise, . - - to include the certificate's issuer name and serial number in this extension; otherwise, . - Creates an based on values from the provided certificate. - The configured extension. - To be added. - - is . - - is , but - does not contain a Subject Key Identifier extension. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension - - - - - - - The issuer name value from the Certificate Authority (CA) certificate that will sign this extension. - The serial number value from the Certificate Authority (CA) certificate that will sign this extension. - Creates an that specifies the provided issuer name and serial number. - The configured extension. - To be added. - - or is . - - is invalid because the leading 9 bits are either - all zero or all one. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension - - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - The issuer name value from the Certificate Authority (CA) certificate that will sign this extension. - The serial number value from the Certificate Authority (CA) certificate that will sign this extension. - Creates an that specifies the provided issuer name and serial number. - The configured extension. - To be added. - - is . - - is invalid because the leading 9 bits are either - all zero or all one. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension - - - - - - The subject key identifier value from the Certificate Authority (CA) certificate that will sign this extension. - Creates an that specifies the provided key identifier value. - The configured extension. - To be added. - - is . - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension - - - - - - The subject key identifier value from the Certificate Authority (CA) certificate that will sign this extension. - Creates an that specifies the provided key identifier value. - The configured extension. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension - - - - - - The subject key identifier extension from the Certificate Authority (CA) certificate that will sign this extension. - Creates an that specifies the key identifier value from a subject key identifier extension. - The configured extension. - To be added. - - is . - - - - - - - - - - Property - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Nullable<System.ReadOnlyMemory<System.Byte>> - - - Gets the subject key identifier value from this certificate's issuing Certificate Authority (CA), when specified. - The subject key identifier from this certificate's issuing Certificate Authority (CA). - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.Security.Cryptography.X509Certificates.X500DistinguishedName - - - Gets the value from this certificate's issuing Certificate Authority (CA), when available. - The value from this certificate's issuing Certificate Authority (CA). - - This property is if any of the following are true: -
    -
  • The encoded extension does not include an authorityCertIssuer value.
  • -
  • The authorityCertIssuer value contains no directoryName values.
  • -
  • The authorityCertIssuer value contains multiple directoryName values.
  • -
  • The directoryName value did not successfully decode as an .
  • -
-
-
-
- - - - - - - - Property - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Nullable<System.ReadOnlyMemory<System.Byte>> - - - Gets the encoded representation of the authorityCertIssuer field from the extension, or when the extension does not contain an authority certificate issuer field. - The encoded authorityCertIssuer value. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Nullable<System.ReadOnlyMemory<System.Byte>> - - - Gets the serial number of this certificate's issuing Certificate Authority (CA). - The serial number from this certificate's issuing Certificate Authority (CA). - To be added. - - -
-
+ + + + + + + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.X509Certificates.X509Extension + + + + Represents the Authority Key Identifier X.509 Extension (2.5.29.35). + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + Initializes a new instance of the class. + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + + + + + The encoded data used to create the extension. + + if the extension is critical; otherwise, . + Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. + To be added. + + is . + + did not decode as an Authority Key Identifier extension. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + The encoded data used to create the extension. + + if the extension is critical; otherwise, . + Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. + To be added. + + did not decode as an Authority Key Identifier extension. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Void + + + + + + The to be copied. + Copies the extension properties of the specified object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension + + + + + + + + The subject key identifier value from the Certificate Authority (CA) certificate that will sign this extension. + The issuer name value from the Certificate Authority (CA) certificate that will sign this extension. + The serial number value from the Certificate Authority (CA) certificate that will sign this extension. + Creates an that specifies the provided key identifier, issuer name and serial number. + The configured extension. + To be added. + + , or + is . + + is invalid because the leading 9 bits are either + all zero or all one. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The subject key identifier value from the Certificate Authority (CA) certificate that will sign this extension. + The issuer name value from the Certificate Authority (CA) certificate that will sign this extension. + The serial number value from the Certificate Authority (CA) certificate that will sign this extension. + Creates an that specifies the provided key identifier, issuer name and serial number. + The configured extension. + To be added. + + is . + + is invalid because the leading 9 bits are either + all zero or all one. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension + + + + + + + + The Certificate Authority (CA) certificate that will sign this extension. + + to include the Subject Key Identifier value from the certificate as the key identifier value in this extension; otherwise, . + + to include the certificate's issuer name and serial number in this extension; otherwise, . + Creates an based on values from the provided certificate. + The configured extension. + To be added. + + is . + + is , but + does not contain a Subject Key Identifier extension. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension + + + + + + + The issuer name value from the Certificate Authority (CA) certificate that will sign this extension. + The serial number value from the Certificate Authority (CA) certificate that will sign this extension. + Creates an that specifies the provided issuer name and serial number. + The configured extension. + To be added. + + or is . + + is invalid because the leading 9 bits are either + all zero or all one. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension + + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + The issuer name value from the Certificate Authority (CA) certificate that will sign this extension. + The serial number value from the Certificate Authority (CA) certificate that will sign this extension. + Creates an that specifies the provided issuer name and serial number. + The configured extension. + To be added. + + is . + + is invalid because the leading 9 bits are either + all zero or all one. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension + + + + + + The subject key identifier value from the Certificate Authority (CA) certificate that will sign this extension. + Creates an that specifies the provided key identifier value. + The configured extension. + To be added. + + is . + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension + + + + + + The subject key identifier value from the Certificate Authority (CA) certificate that will sign this extension. + Creates an that specifies the provided key identifier value. + The configured extension. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension + + + + + + The subject key identifier extension from the Certificate Authority (CA) certificate that will sign this extension. + Creates an that specifies the key identifier value from a subject key identifier extension. + The configured extension. + To be added. + + is . + + + + + + + + + + Property + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Nullable<System.ReadOnlyMemory<System.Byte>> + + + Gets the subject key identifier value from this certificate's issuing Certificate Authority (CA), when specified. + The subject key identifier from this certificate's issuing Certificate Authority (CA). + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.Security.Cryptography.X509Certificates.X500DistinguishedName + + + Gets the value from this certificate's issuing Certificate Authority (CA), when available. + The value from this certificate's issuing Certificate Authority (CA). + + This property is if any of the following are true: +
    +
  • The encoded extension does not include an authorityCertIssuer value.
  • +
  • The authorityCertIssuer value contains no directoryName values.
  • +
  • The authorityCertIssuer value contains multiple directoryName values.
  • +
  • The directoryName value did not successfully decode as an .
  • +
+
+
+
+ + + + + + + + Property + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Nullable<System.ReadOnlyMemory<System.Byte>> + + + Gets the encoded representation of the authorityCertIssuer field from the extension, or when the extension does not contain an authority certificate issuer field. + The encoded authorityCertIssuer value. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Nullable<System.ReadOnlyMemory<System.Byte>> + + + Gets the serial number of this certificate's issuing Certificate Authority (CA). + The serial number from this certificate's issuing Certificate Authority (CA). + To be added. + + +
+
diff --git a/xml/System.Security.Cryptography.X509Certificates/X509SubjectAlternativeNameExtension.xml b/xml/System.Security.Cryptography.X509Certificates/X509SubjectAlternativeNameExtension.xml index 6d160b2b1b6..796f501636a 100644 --- a/xml/System.Security.Cryptography.X509Certificates/X509SubjectAlternativeNameExtension.xml +++ b/xml/System.Security.Cryptography.X509Certificates/X509SubjectAlternativeNameExtension.xml @@ -1,184 +1,184 @@ - - - - - - - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.X509Certificates.X509Extension - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - Represents the Subject Alternative Name X.509 Extension (2.5.29.17). - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - Initializes a new instance of the class. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - The encoded data used to create the extension. - - if the extension is critical; otherwise, . The default is . - Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. - To be added. - - is . - - did not decode as a Subject Alternative Name extension. - - - - - - - - - Constructor - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - - - - - The encoded data used to create the extension. - - if the extension is critical; otherwise, . The default is . - Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. - To be added. - - did not decode as a Subject Alternative Name extension. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Collections.Generic.IEnumerable<System.String> - - - - Enumerates the alternative name entries with a DNS Name type identifier. - The name entries with a DNS Name type identifier. - To be added. - The contents of the extension could not be decoded successfully. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Collections.Generic.IEnumerable<System.Net.IPAddress> - - - - Enumerates the alternative name entries with an IP Address type identifier. - The name entries with an IP Address type identifier. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.X509Certificates.X509Extension + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Represents the Subject Alternative Name X.509 Extension (2.5.29.17). + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + Initializes a new instance of the class. + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + The encoded data used to create the extension. + + if the extension is critical; otherwise, . The default is . + Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. + To be added. + + is . + + did not decode as a Subject Alternative Name extension. + + + + + + + + + Constructor + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + + + + + The encoded data used to create the extension. + + if the extension is critical; otherwise, . The default is . + Initializes a new instance of the class from an encoded representation of the extension and an optional critical marker. + To be added. + + did not decode as a Subject Alternative Name extension. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The to be copied. + Copies the extension properties of the specified object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Collections.Generic.IEnumerable<System.String> + + + + Enumerates the alternative name entries with a DNS Name type identifier. + The name entries with a DNS Name type identifier. + To be added. + The contents of the extension could not be decoded successfully. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Net.IPAddress> + + + + Enumerates the alternative name entries with an IP Address type identifier. + The name entries with an IP Address type identifier. + To be added. + + + + diff --git a/xml/System.Security.Cryptography/AesGcm.xml b/xml/System.Security.Cryptography/AesGcm.xml index 2d5d87231c1..028be65c023 100644 --- a/xml/System.Security.Cryptography/AesGcm.xml +++ b/xml/System.Security.Cryptography/AesGcm.xml @@ -1,651 +1,660 @@ - - - - - - - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.Object - - - - System.IDisposable - - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - Represents an Advanced Encryption Standard (AES) key to be used with the Galois/Counter Mode (GCM) mode of operation. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - - - - The secret key to use for this instance. - Initializes a new instance of the class with a provided key. - To be added. - The parameter is . - The parameter length is other than 16, 24, or 32 bytes (128, 192, or 256 bits). - - - - - - - - - - Constructor - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - - - - The secret key to use for this instance. - Initializes a new instance of the class with a provided key. - To be added. - The parameter length is other than 16, 24, or 32 bytes (128, 192, or 256 bits). - - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - The nonce associated with this message, which must match the value provided during encryption. - The encrypted content to decrypt. - The authentication tag produced for this message during encryption. - The byte array to receive the decrypted contents. - Extra data associated with this message, which must match the value provided during encryption. - Decrypts the ciphertext into the provided destination buffer if the authentication tag can be validated. - - - - The parameter and the do not have the same length. - --or- - -The parameter length is not permitted by . - --or- - -The parameter length is not permitted by . - The , , , or parameter is . - The tag value could not be verified, or the decryption operation otherwise failed. - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - - - The nonce associated with this message, which must match the value provided during encryption. - The encrypted content to decrypt. - The authentication tag produced for this message during encryption. - The byte span to receive the decrypted contents. - Extra data associated with this message, which must match the value provided during encryption. - Decrypts the ciphertext into the provided destination buffer if the authentication tag can be validated. - - - - The parameter and the do not have the same length. - --or- - -The parameter length is not permitted by . - --or- - -The parameter length is not permitted by . - The tag value could not be verified, or the decryption operation otherwise failed. - - - - - - - - - - Method - - M:System.IDisposable.Dispose - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - Releases the resources used by the current instance of the class. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - The nonce associated with this message, which should be a unique value for every operation with the same key. - The content to encrypt. - The byte array to receive the encrypted contents. - The byte array to receive the generated authentication tag. - Extra data associated with this message, which must also be provided during decryption. - Encrypts the plaintext into the ciphertext destination buffer and generates the authentication tag into a separate buffer. - - - - The parameter and the do not have the same length. - --or- - -The parameter length is not permitted by . - --or- - -The parameter length is not permitted by . - The , , , or parameter is . - The encryption operation failed. - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - - - The nonce associated with this message, which should be a unique value for every operation with the same key. - The content to encrypt. - The byte array to receive the encrypted contents. - The byte array to receive the generated authentication tag. - Extra data associated with this message, which must also be provided during decryption. - Encrypts the plaintext into the ciphertext destination buffer and generates the authentication tag into a separate buffer. - - - - The parameter and the do not have the same length. - --or- - -The parameter length is not permitted by . - --or- - -The parameter length is not permitted by . - The encryption operation failed. - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - Gets a value that indicates whether the algorithm is supported on the current platform. - - if the algorithm is supported; otherwise, . - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.KeySizes - - - Gets the nonce sizes, in bytes, supported by this instance. - The nonce sizes supported by this instance: 12 bytes (96 bits). - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.KeySizes - - - Gets the tag sizes, in bytes, supported by this instance. - The tag sizes supported by this instance: 12, 13, 14, 15, or 16 bytes (96, 104, 112, 120, or 128 bits). - To be added. - AesGcm authentication tag size on macOS - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Nullable<System.Int32> - - - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.Object + + + + System.IDisposable + + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Represents an Advanced Encryption Standard (AES) key to be used with the Galois/Counter Mode (GCM) mode of operation. + To be added. + + + + + + + + + + Constructor + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + + + + The secret key to use for this instance. + Initializes a new instance of the class with a provided key. + To be added. + The parameter is . + The parameter length is other than 16, 24, or 32 bytes (128, 192, or 256 bits). + + + + + + + + + + Constructor + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + + + + The secret key to use for this instance. + Initializes a new instance of the class with a provided key. + To be added. + The parameter length is other than 16, 24, or 32 bytes (128, 192, or 256 bits). + + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + + + + The secret key to use for this instance. + The size of the tag, in bytes, that encryption and decryption must use. + Initializes a new instance of the class with a provided key and required tag size. + The parameter is used to indicate that the tag parameter in Encrypt or Decrypt must be exactly this size. Indicating the required tag size prevents issues where callers of Decrypt may supply a tag as input and that input is truncated to an unexpected size. + The parameter is . + The parameter length is other than 16, 24, or 32 bytes (128, 192, or 256 bits). + The parameter is an unsupported tag size indicated by + . + The current platform does not support AES-GCM. + + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + + + + + The secret key to use for this instance. + The size of the tag, in bytes, that encryption and decryption must use. + Initializes a new instance of the class with a provided key and required tag size. + The parameter is used to indicate that the tag parameter in Encrypt or Decrypt must be exactly this size. Indicating the required tag size prevents issues where callers of Decrypt may supply a tag as input and that input is truncated to an unexpected size. + The parameter length is other than 16, 24, or 32 bytes (128, 192, or 256 bits). + The parameter is an unsupported tag size indicated by + . + The current platform does not support AES-GCM. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + The nonce associated with this message, which must match the value provided during encryption. + The encrypted content to decrypt. + The authentication tag produced for this message during encryption. + The byte array to receive the decrypted contents. + Extra data associated with this message, which must match the value provided during encryption. + Decrypts the ciphertext into the provided destination buffer if the authentication tag can be validated. + + + + The parameter and the do not have the same length. + +-or- + +The parameter length is not permitted by . + +-or- + +The parameter length is not permitted by . + The , , , or parameter is . + The tag value could not be verified, or the decryption operation otherwise failed. + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + + + The nonce associated with this message, which must match the value provided during encryption. + The encrypted content to decrypt. + The authentication tag produced for this message during encryption. + The byte span to receive the decrypted contents. + Extra data associated with this message, which must match the value provided during encryption. + Decrypts the ciphertext into the provided destination buffer if the authentication tag can be validated. + + + + The parameter and the do not have the same length. + +-or- + +The parameter length is not permitted by . + +-or- + +The parameter length is not permitted by . + The tag value could not be verified, or the decryption operation otherwise failed. + + + + + + + + + + Method + + M:System.IDisposable.Dispose + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + Releases the resources used by the current instance of the class. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + The nonce associated with this message, which should be a unique value for every operation with the same key. + The content to encrypt. + The byte array to receive the encrypted contents. + The byte array to receive the generated authentication tag. + Extra data associated with this message, which must also be provided during decryption. + Encrypts the plaintext into the ciphertext destination buffer and generates the authentication tag into a separate buffer. + + + + The parameter and the do not have the same length. + +-or- + +The parameter length is not permitted by . + +-or- + +The parameter length is not permitted by . + The , , , or parameter is . + The encryption operation failed. + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + + + The nonce associated with this message, which should be a unique value for every operation with the same key. + The content to encrypt. + The byte array to receive the encrypted contents. + The byte array to receive the generated authentication tag. + Extra data associated with this message, which must also be provided during decryption. + Encrypts the plaintext into the ciphertext destination buffer and generates the authentication tag into a separate buffer. + + + + The parameter and the do not have the same length. + +-or- + +The parameter length is not permitted by . + +-or- + +The parameter length is not permitted by . + The encryption operation failed. + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the algorithm is supported on the current platform. + + if the algorithm is supported; otherwise, . + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.KeySizes + + + Gets the nonce sizes, in bytes, supported by this instance. + The nonce sizes supported by this instance: 12 bytes (96 bits). + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.KeySizes + + + Gets the tag sizes, in bytes, supported by this instance. + The tag sizes supported by this instance: 12, 13, 14, 15, or 16 bytes (96, 104, 112, 120, or 128 bits). + To be added. + AesGcm authentication tag size on macOS + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Nullable<System.Int32> + + + Gets the size of the tag, in bytes. + The size of the tag that must be used for encryption or decryption, or if the tag size is unspecified. + To be added. + + + + diff --git a/xml/System.Security.Cryptography/AsymmetricAlgorithm.xml b/xml/System.Security.Cryptography/AsymmetricAlgorithm.xml index f4321b01e92..84daeea0f67 100644 --- a/xml/System.Security.Cryptography/AsymmetricAlgorithm.xml +++ b/xml/System.Security.Cryptography/AsymmetricAlgorithm.xml @@ -1,2452 +1,2469 @@ - - - - - - - - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.Object - - - - System.IDisposable - - - - - [System.Runtime.InteropServices.ComVisible(true)] - [<System.Runtime.InteropServices.ComVisible(true)>] - - - - Represents the abstract base class from which all implementations of asymmetric algorithms must inherit. - - class is an implementation of a public-key algorithm. For an in-depth discussion of public-key encryption and algorithms, see the "Public-Key Encryption" section in [Cryptographic Services](/dotnet/standard/security/cryptographic-services). For information about how to use the Strong Name tool (Sn.exe) to create key pairs, see [How to: Create a Public-Private Key Pair](/dotnet/standard/assembly/create-public-private-key-pair). - - You can use public-key systems to form digital signatures. Digital signatures are used to help to protect the integrity of data. For example, to use a public-key system to digitally sign a message, the sender first applies a hash function to the message to create a message digest. The sender then encrypts the message digest with the sender's private key to create the sender's personal signature. Upon receiving the message and signature, the receiver decrypts the signature using the sender's public key to recover the message digest and hashes the message using the same hash algorithm that the sender used. If the message digest that the receiver computes matches the message digest received from the sender, the receiver can assume that the message was not altered while in transit. Note that anyone can verify a signature, because the sender's public key is common knowledge. This technique does not retain the secrecy of the message; for the message to be secret, it must also be encrypted. - - The .NET Framework provides the following classes that implement digital signature algorithms: , , (base class), and . - - The namespace provides concrete classes for and only. - - To learn how to use the RSA algorithm to encrypt and decrypt XML data, and create and verify XML digital signatures, see these articles: - -- [How to: Encrypt XML Elements with Asymmetric Keys](/dotnet/standard/security/how-to-encrypt-xml-elements-with-asymmetric-keys) - -- [How to: Decrypt XML Elements with Asymmetric Keys](/dotnet/standard/security/how-to-decrypt-xml-elements-with-asymmetric-keys) - -- [How to: Sign XML Documents with Digital Signatures](/dotnet/standard/security/how-to-sign-xml-documents-with-digital-signatures) - -- [How to: Verify the Digital Signatures of XML Documents](/dotnet/standard/security/how-to-verify-the-digital-signatures-of-xml-documents) - - - -## Examples - The following code example demonstrates how to implement a custom asymmetric algorithm inherited from the class. An additional class is provided to demonstrate how to use the custom class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet2"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet2"::: - - Here's an additional class that demonstrates how to use the custom class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcryptoimpl.cpp" id="Snippet3"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet3"::: - - ]]> - - Cryptographic Services - How to: Create a Public/Private Key Pair - - - - - - - - - Constructor - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - Initializes a new instance of the class. - - and classes are the only currently supported implementations. - - ]]> - - The implementation of the derived class is not valid. - Cryptographic Services - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - Releases all resources used by the class. - - method. - - Calling `Dispose` allows the resources used by the class to be reallocated for other purposes. For more information about `Dispose`, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). - - - -## Examples - The following code example demonstrates how to call the method to release the resources of the current `customCrypto` object. This code example is part of a larger example provided for the class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcryptoimpl.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet1"::: - - ]]> - - Cryptographic Services - - - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - Creates a cryptographic object used to perform the asymmetric algorithm. - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Obsolete("The default implementation of this cryptography algorithm is not supported", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("The default implementation of this cryptography algorithm is not supported", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - [System.Obsolete("The default implementation of this cryptography algorithm is not supported.", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("The default implementation of this cryptography algorithm is not supported.", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.AsymmetricAlgorithm - - - - Creates a default cryptographic object used to perform the asymmetric algorithm. - A new instance, unless the default settings have been changed with the [<cryptoClass> element](/dotnet/framework/configure-apps/file-schema/cryptography/cryptoclass-element). - - method in an extended class. This code example is part of a larger example provided for the class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet11"::: - - ]]> - - .NET Core 2.0 - 3.1 and .NET 5 and later: In all cases. - Cryptographic Services - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] - [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>] - - - [System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.AsymmetricAlgorithm - - - - - - The asymmetric algorithm implementation to use. The following table shows the valid values for the parameter and the algorithms they map to. - - Parameter value - - Implements - - System.Security.Cryptography.AsymmetricAlgorithm - - RSA - - System.Security.Cryptography.RSA - - DSA - - System.Security.Cryptography.DSA - - ECDsa - - ECDsaCng - - System.Security.Cryptography.ECDsaCng - - ECDH - - ECDiffieHellman - - ECDiffieHellmanCng - - System.Security.Cryptography.ECDiffieHellmanCng - - - Creates an instance of the specified implementation of an asymmetric algorithm. - A new instance of the specified asymmetric algorithm implementation. - - method in an extended class. This code example is part of a larger example provided for the class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet12"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet12"::: - - ]]> - - Cryptographic Services - - - - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - - - Releases all resources used by the current instance of the class. - - - - - - - - - - Method - - M:System.IDisposable.Dispose - - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - Releases all resources used by the current instance of the class. - - . The `Dispose` method leaves the in an unusable state. After calling `Dispose`, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. - - For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - -> [!NOTE] -> Always call `Dispose` before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. - - ]]> - - - - - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - to release both managed and unmanaged resources; to release only unmanaged resources. - Releases the unmanaged resources used by the class and optionally releases the managed resources. - - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - - ]]> - - - - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - The bytes to use as a password when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password. - A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. - - - - The key could not be exported. - --or- - - indicates that should be used, which requires -based passwords. - - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - The password to use when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password. - A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. - - - - The key could not be exported. - - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.String - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.String - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - The password to use when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password, PEM encoded. - A string containing the PEM-encoded PKCS#8 EncryptedPrivateKeyInfo. - - - - An implementation for or - has not been provided. - The key could not be exported. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - Exports the current key in the PKCS#8 PrivateKeyInfo format. - A byte array containing the PKCS#8 PrivateKeyInfo representation of this key. - To be added. - The key could not be exported. - - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.String - - - - Exports the current key in the PKCS#8 PrivateKeyInfo format, PEM encoded. - A string containing the PEM-encoded PKCS#8 PrivateKeyInfo. - - - - An implementation for or - has not been provided. - The key could not be exported. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format. - A byte array containing the X.509 SubjectPublicKeyInfo representation of the public-key portion of this key. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.String - - - - Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format, PEM encoded. - A string containing the PEM-encoded X.509 SubjectPublicKeyInfo. - - - - An implementation for or - has not been provided. - The key could not be exported. - - - - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Void - - - - - - The XML string to use to reconstruct the object. - When overridden in a derived class, reconstructs an object from an XML string. Otherwise, throws a . - - method to parse the specified XML string to populate the current object. This code example is part of a larger example provided for the class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet4"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet4"::: - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - - The bytes to use as a password when decrypting the key material. - The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - 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. - - throws a by default. - - ]]> - - The password is incorrect. - --or- - -The contents of indicate the Key Derivation Function (KDF) to apply is the legacy PKCS#12 KDF, which requires -based passwords. - --or- - -The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - A derived type has not overriden this member. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - - The password to use for decrypting the key material. - The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - 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. - - throws a by default. - - ]]> - - The password is incorrect. - --or- - -The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - A derived type has not overriden this member. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - System.Void - - - - - - - The PEM text of the encrypted key to import. - The bytes to use as a password when decrypting the key material. - When overridden in a derived class, imports an encrypted RFC 7468 PEM-encoded key, replacing the keys for this object. - - . - - ]]> - - A derived type has not overridden this member. - - does not contain a PEM-encoded key with a recognized label. - --or- - - contains multiple PEM-encoded keys with a recognized label. - - - - The password is incorrect. - --or- - -The base-64 decoded contents of the PEM text from - do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The base-64 decoded contents of the PEM text from - indicate the key is for an algorithm other than the algorithm - represented by this instance. - --or- - -The base-64 decoded contents of the PEM text from - represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - System.Void - - - - - - - The PEM text of the encrypted key to import. - The password to use for decrypting the key material. - When overridden in a derived class, imports an encrypted RFC 7468 PEM-encoded key, replacing the keys for this object. - - . - - ]]> - - A derived type has not overridden this member. - - does not contain a PEM-encoded key with a recognized label. - --or- - - contains multiple PEM-encoded keys with a recognized label. - - - - The password is incorrect. - --or- - -The base-64 decoded contents of the PEM text from - do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The base-64 decoded contents of the PEM text from - indicate the key is for an algorithm other than the algorithm - represented by this instance. - --or- - -The base-64 decoded contents of the PEM text from - represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - System.Void - - - - - - The text of the PEM key to import. - When overridden in a derived class, imports an RFC 7468 textually encoded key, replacing the keys for this object. - - . - - ]]> - - A derived type has not overridden this member. - - does not contain a PEM-encoded key with a recognized label. - --or- - - contains multiple PEM-encoded keys with a recognized label. - --or- - - contains an encrypted PEM-encoded key. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - 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. - - throws a by default. - - ]]> - - The contents of do not represent an ASN.1-BER-encoded PKCS#8 PrivateKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - A derived type has not overriden this member. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - When overriden in a derived class, imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object. - - throws a by default. - ]]> - - The contents of do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - A derived type has not overriden this member. - - - - - - - - - - - - - - Property - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.String - - - When overridden in a derived class, gets the name of the key exchange algorithm. Otherwise, throws an . - The name of the key exchange algorithm. - - property to return the name for the key exchange algorithm. This code example is part of a larger example provided for the class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet6"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet6"::: - - ]]> - - Cryptographic Services - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm. - The size, in bits, of the key modulus used by the asymmetric algorithm. - - property. - - - -## Examples - The following code example demonstrates how to override the property to verify that it falls within the range identified in the local `keySizes` member variable. This code example is part of a larger example provided for the class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet9"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet9"::: - - ]]> - - The key modulus size is invalid. - Cryptographic Services - - - - - - - - - - Field - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - Represents the size, in bits, of the key modulus used by the asymmetric algorithm. - - property. - - This field is accessed through the property. - - ]]> - - Cryptographic Services - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - [get: System.Runtime.CompilerServices.NullableContext(1)] - [<get: System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.KeySizes[] - - - Gets the key sizes that are supported by the asymmetric algorithm. - An array that contains the key sizes supported by the asymmetric algorithm. - - property to retrieve the , , and properties. This code example is part of a larger example provided for the class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcryptoimpl.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet10"::: - - ]]> - - Cryptographic Services - - - - - - - - - - Field - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Diagnostics.CodeAnalysis.MaybeNull] - [<System.Diagnostics.CodeAnalysis.MaybeNull>] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - System.Security.Cryptography.KeySizes[] - - - Specifies the key sizes that are supported by the asymmetric algorithm. - - property. - - ]]> - - Cryptographic Services - - - - - - - - - - - - - - Property - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.String - - - When implemented in a derived class, gets the name of the signature algorithm. Otherwise, always throws a . - The name of the signature algorithm. - - property to return the name of the signature algorithm. This code example is part of a larger example provided for the class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet7"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet7"::: - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - M:System.IDisposable.Dispose - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - For a description of this member, see . - - instance is cast to an interface. - -]]> - - - Cryptographic Services - - - - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.String - - - - - - - to include private parameters; otherwise, . - When overridden in a derived class, creates and returns an XML string representation of the current object. Otherwise, throws a . - An XML string encoding of the current object. - - method to create an XML representation of the parameters in the current object. This code example is part of a larger example provided for the class. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet5"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet5"::: - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - The bytes to use as a password when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - 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. - - if is big enough to receive the output; otherwise, . - - throws a by default. - - ]]> - - The key could not be exported. - --or- - - indicates that should be used, which requires -based passwords. - - A derived type has not overriden this member. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - The password to use when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - 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. - - if is big enough to receive the output; otherwise, . - - throws a by default. - - ]]> - - The key could not be exported. - A derived type has not overriden this member. - - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - The password to use when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - The character span to receive the PEM-encoded PKCS#8 EncryptedPrivateKeyInfo data. - When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. - Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password, PEM encoded. - - if is big enough to receive the output; otherwise, . - - - - An implementation for - has not been provided. - The key could not be exported. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - The byte span to receive the PKCS#8 PrivateKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - When overridden in a derived class, attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. - - if is big enough to receive the output; otherwise, . - - throws a by default. - - ]]> - - The key could not be exported. - A derived type has not overriden this member. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Boolean - - - - - - - The character span to receive the PEM-encoded PKCS#8 PrivateKeyInfo data. - When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PEM-encoded PKCS#8 PrivateKeyInfo format into a provided buffer. - - if is big enough to receive the output; otherwise, . - - - - An implementation for - has not been provided. - The key could not be exported. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - The byte span to receive the X.509 SubjectPublicKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - When overridden in a derived class, attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer. - - if is big enough to receive the output; otherwise, . - - throws a by default. - - ]]> - - The key could not be exported. - A derived type has not overriden this member. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Boolean - - - - - - - The character span to receive the PEM-encoded X.509 SubjectPublicKeyInfo data. - When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PEM-encoded X.509 SubjectPublicKeyInfo format into a provided buffer. - - if is big enough to receive the output; otherwise, . - - - - An implementation for - has not been provided. - The key could not be exported. - - - - + + + + + + + + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.Object + + + + System.IDisposable + + + + + [System.Runtime.InteropServices.ComVisible(true)] + [<System.Runtime.InteropServices.ComVisible(true)>] + + + + Represents the abstract base class from which all implementations of asymmetric algorithms must inherit. + + class is an implementation of a public-key algorithm. For an in-depth discussion of public-key encryption and algorithms, see the "Public-Key Encryption" section in [Cryptographic Services](/dotnet/standard/security/cryptographic-services). For information about how to use the Strong Name tool (Sn.exe) to create key pairs, see [How to: Create a Public-Private Key Pair](/dotnet/standard/assembly/create-public-private-key-pair). + + You can use public-key systems to form digital signatures. Digital signatures are used to help to protect the integrity of data. For example, to use a public-key system to digitally sign a message, the sender first applies a hash function to the message to create a message digest. The sender then encrypts the message digest with the sender's private key to create the sender's personal signature. Upon receiving the message and signature, the receiver decrypts the signature using the sender's public key to recover the message digest and hashes the message using the same hash algorithm that the sender used. If the message digest that the receiver computes matches the message digest received from the sender, the receiver can assume that the message was not altered while in transit. Note that anyone can verify a signature, because the sender's public key is common knowledge. This technique does not retain the secrecy of the message; for the message to be secret, it must also be encrypted. + + The .NET Framework provides the following classes that implement digital signature algorithms: , , (base class), and . + + The namespace provides concrete classes for and only. + + To learn how to use the RSA algorithm to encrypt and decrypt XML data, and create and verify XML digital signatures, see these articles: + +- [How to: Encrypt XML Elements with Asymmetric Keys](/dotnet/standard/security/how-to-encrypt-xml-elements-with-asymmetric-keys) + +- [How to: Decrypt XML Elements with Asymmetric Keys](/dotnet/standard/security/how-to-decrypt-xml-elements-with-asymmetric-keys) + +- [How to: Sign XML Documents with Digital Signatures](/dotnet/standard/security/how-to-sign-xml-documents-with-digital-signatures) + +- [How to: Verify the Digital Signatures of XML Documents](/dotnet/standard/security/how-to-verify-the-digital-signatures-of-xml-documents) + + + +## Examples + The following code example demonstrates how to implement a custom asymmetric algorithm inherited from the class. An additional class is provided to demonstrate how to use the custom class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet2"::: + + Here's an additional class that demonstrates how to use the custom class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcryptoimpl.cpp" id="Snippet3"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet3"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet3"::: + + ]]> + + Cryptographic Services + How to: Create a Public/Private Key Pair + + + + + + + + + Constructor + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + Initializes a new instance of the class. + + and classes are the only currently supported implementations. + + ]]> + + The implementation of the derived class is not valid. + Cryptographic Services + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + Releases all resources used by the class. + + method. + + Calling `Dispose` allows the resources used by the class to be reallocated for other purposes. For more information about `Dispose`, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + + + +## Examples + The following code example demonstrates how to call the method to release the resources of the current `customCrypto` object. This code example is part of a larger example provided for the class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcryptoimpl.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet1"::: + + ]]> + + Cryptographic Services + + + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + Creates a cryptographic object used to perform the asymmetric algorithm. + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Obsolete("The default implementation of this cryptography algorithm is not supported", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("The default implementation of this cryptography algorithm is not supported", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + [System.Obsolete("The default implementation of this cryptography algorithm is not supported.", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("The default implementation of this cryptography algorithm is not supported.", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.AsymmetricAlgorithm + + + + Creates a default cryptographic object used to perform the asymmetric algorithm. + A new instance, unless the default settings have been changed with the [<cryptoClass> element](/dotnet/framework/configure-apps/file-schema/cryptography/cryptoclass-element). + + method in an extended class. This code example is part of a larger example provided for the class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet11"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet11"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet11"::: + + ]]> + + .NET Core 2.0 - 3.1 and .NET 5 and later: In all cases. + Cryptographic Services + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] + [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>] + + + [System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.AsymmetricAlgorithm + + + + + + The asymmetric algorithm implementation to use. The following table shows the valid values for the parameter and the algorithms they map to. + + Parameter value + + Implements + + System.Security.Cryptography.AsymmetricAlgorithm + + RSA + + System.Security.Cryptography.RSA + + DSA + + System.Security.Cryptography.DSA + + ECDsa + + ECDsaCng + + System.Security.Cryptography.ECDsaCng + + ECDH + + ECDiffieHellman + + ECDiffieHellmanCng + + System.Security.Cryptography.ECDiffieHellmanCng + + + Creates an instance of the specified implementation of an asymmetric algorithm. + A new instance of the specified asymmetric algorithm implementation. + + method in an extended class. This code example is part of a larger example provided for the class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet12"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet12"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet12"::: + + ]]> + + Cryptographic Services + + + + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + + + Releases all resources used by the current instance of the class. + + + + + + + + + + Method + + M:System.IDisposable.Dispose + + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + Releases all resources used by the current instance of the class. + + . The `Dispose` method leaves the in an unusable state. After calling `Dispose`, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. + + For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + +> [!NOTE] +> Always call `Dispose` before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. + + ]]> + + + + + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + to release both managed and unmanaged resources; to release only unmanaged resources. + Releases the unmanaged resources used by the class and optionally releases the managed resources. + + method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + + ]]> + + + + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + + For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + + + + The key could not be exported. + +-or- + + indicates that should be used, which requires -based passwords. + + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + + + + The key could not be exported. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.String + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password, PEM encoded. + A string containing the PEM-encoded PKCS#8 EncryptedPrivateKeyInfo. + + A PEM-encoded PKCS#8 EncryptedPrivateKeyInfo will begin with -----BEGIN ENCRYPTED PRIVATE KEY----- and end with -----END ENCRYPTED PRIVATE KEY-----, with the base64 encoded DER contents of the key between the PEM boundaries. + + The PEM is encoded according to the IETF RFC 7468 "strict" encoding rules. + + + An implementation for or + has not been provided. + The key could not be exported. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.String + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password, PEM encoded. + A string containing the PEM-encoded PKCS#8 EncryptedPrivateKeyInfo. + + + + An implementation for or + has not been provided. + The key could not be exported. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + Exports the current key in the PKCS#8 PrivateKeyInfo format. + A byte array containing the PKCS#8 PrivateKeyInfo representation of this key. + To be added. + The key could not be exported. + + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.String + + + + Exports the current key in the PKCS#8 PrivateKeyInfo format, PEM encoded. + A string containing the PEM-encoded PKCS#8 PrivateKeyInfo. + + + + An implementation for or + has not been provided. + The key could not be exported. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format. + A byte array containing the X.509 SubjectPublicKeyInfo representation of the public-key portion of this key. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.String + + + + Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format, PEM encoded. + A string containing the PEM-encoded X.509 SubjectPublicKeyInfo. + + + + An implementation for or + has not been provided. + The key could not be exported. + + + + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Void + + + + + + The XML string to use to reconstruct the object. + When overridden in a derived class, reconstructs an object from an XML string. Otherwise, throws a . + + method to parse the specified XML string to populate the current object. This code example is part of a larger example provided for the class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet4"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet4"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet4"::: + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + + The bytes to use as a password when decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + 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. + + throws a by default. + + ]]> + + The password is incorrect. + +-or- + +The contents of indicate the Key Derivation Function (KDF) to apply is the legacy PKCS#12 KDF, which requires -based passwords. + +-or- + +The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + A derived type has not overriden this member. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + + The password to use for decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + 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. + + throws a by default. + + ]]> + + The password is incorrect. + +-or- + +The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + A derived type has not overriden this member. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + System.Void + + + + + + + The PEM text of the encrypted key to import. + The bytes to use as a password when decrypting the key material. + When overridden in a derived class, imports an encrypted RFC 7468 PEM-encoded key, replacing the keys for this object. + + . + + ]]> + + A derived type has not overridden this member. + + does not contain a PEM-encoded key with a recognized label. + +-or- + + contains multiple PEM-encoded keys with a recognized label. + + + + The password is incorrect. + +-or- + +The base-64 decoded contents of the PEM text from + do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The base-64 decoded contents of the PEM text from + indicate the key is for an algorithm other than the algorithm + represented by this instance. + +-or- + +The base-64 decoded contents of the PEM text from + represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + System.Void + + + + + + + The PEM text of the encrypted key to import. + The password to use for decrypting the key material. + When overridden in a derived class, imports an encrypted RFC 7468 PEM-encoded key, replacing the keys for this object. + + . + + ]]> + + A derived type has not overridden this member. + + does not contain a PEM-encoded key with a recognized label. + +-or- + + contains multiple PEM-encoded keys with a recognized label. + + + + The password is incorrect. + +-or- + +The base-64 decoded contents of the PEM text from + do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The base-64 decoded contents of the PEM text from + indicate the key is for an algorithm other than the algorithm + represented by this instance. + +-or- + +The base-64 decoded contents of the PEM text from + represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + System.Void + + + + + + The text of the PEM key to import. + When overridden in a derived class, imports an RFC 7468 textually encoded key, replacing the keys for this object. + + . + + ]]> + + A derived type has not overridden this member. + + does not contain a PEM-encoded key with a recognized label. + +-or- + + contains multiple PEM-encoded keys with a recognized label. + +-or- + + contains an encrypted PEM-encoded key. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + 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. + + throws a by default. + + ]]> + + The contents of do not represent an ASN.1-BER-encoded PKCS#8 PrivateKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + A derived type has not overriden this member. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + When overriden in a derived class, imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object. + + throws a by default. + ]]> + + The contents of do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + A derived type has not overriden this member. + + + + + + + + + + + + + + Property + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.String + + + When overridden in a derived class, gets the name of the key exchange algorithm. Otherwise, throws an . + The name of the key exchange algorithm. + + property to return the name for the key exchange algorithm. This code example is part of a larger example provided for the class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet6"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet6"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet6"::: + + ]]> + + Cryptographic Services + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm. + The size, in bits, of the key modulus used by the asymmetric algorithm. + + property. + + + +## Examples + The following code example demonstrates how to override the property to verify that it falls within the range identified in the local `keySizes` member variable. This code example is part of a larger example provided for the class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet9"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet9"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet9"::: + + ]]> + + The key modulus size is invalid. + Cryptographic Services + + + + + + + + + + Field + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + Represents the size, in bits, of the key modulus used by the asymmetric algorithm. + + property. + + This field is accessed through the property. + + ]]> + + Cryptographic Services + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + [get: System.Runtime.CompilerServices.NullableContext(1)] + [<get: System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.KeySizes[] + + + Gets the key sizes that are supported by the asymmetric algorithm. + An array that contains the key sizes supported by the asymmetric algorithm. + + property to retrieve the , , and properties. This code example is part of a larger example provided for the class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcryptoimpl.cpp" id="Snippet10"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet10"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet10"::: + + ]]> + + Cryptographic Services + + + + + + + + + + Field + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Diagnostics.CodeAnalysis.MaybeNull] + [<System.Diagnostics.CodeAnalysis.MaybeNull>] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + System.Security.Cryptography.KeySizes[] + + + Specifies the key sizes that are supported by the asymmetric algorithm. + + property. + + ]]> + + Cryptographic Services + + + + + + + + + + + + + + Property + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.String + + + When implemented in a derived class, gets the name of the signature algorithm. Otherwise, always throws a . + The name of the signature algorithm. + + property to return the name of the signature algorithm. This code example is part of a larger example provided for the class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet7"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet7"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet7"::: + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + M:System.IDisposable.Dispose + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + For a description of this member, see . + + instance is cast to an interface. + +]]> + + + Cryptographic Services + + + + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.String + + + + + + + to include private parameters; otherwise, . + When overridden in a derived class, creates and returns an XML string representation of the current object. Otherwise, throws a . + An XML string encoding of the current object. + + method to create an XML representation of the parameters in the current object. This code example is part of a larger example provided for the class. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/cpp/customcrypto.cpp" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/AsymmetricAlgorithm/Overview/customcrypto.cs" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.AsymmetricAlgorithm/VB/customcrypto.vb" id="Snippet5"::: + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + 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. + + if is big enough to receive the output; otherwise, . + + throws a by default. + + ]]> + + The key could not be exported. + +-or- + + indicates that should be used, which requires -based passwords. + + A derived type has not overriden this member. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + 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. + + if is big enough to receive the output; otherwise, . + + throws a by default. + + ]]> + + The key could not be exported. + A derived type has not overriden this member. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The character span to receive the PEM-encoded PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password, PEM encoded. + + if is big enough to receive the output; otherwise, . + + A PEM-encoded PKCS#8 EncryptedPrivateKeyInfo will begin with -----BEGIN ENCRYPTED PRIVATE KEY----- and end with -----END ENCRYPTED PRIVATE KEY-----, with the base64 encoded DER contents of the key between the PEM boundaries. + + The PEM is encoded according to the IETF RFC 7468 "strict" encoding rules. + + + An implementation for + has not been provided. + The key could not be exported. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The character span to receive the PEM-encoded PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password, PEM encoded. + + if is big enough to receive the output; otherwise, . + + + + An implementation for + has not been provided. + The key could not be exported. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + The byte span to receive the PKCS#8 PrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + When overridden in a derived class, attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. + + if is big enough to receive the output; otherwise, . + + throws a by default. + + ]]> + + The key could not be exported. + A derived type has not overriden this member. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Boolean + + + + + + + The character span to receive the PEM-encoded PKCS#8 PrivateKeyInfo data. + When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PEM-encoded PKCS#8 PrivateKeyInfo format into a provided buffer. + + if is big enough to receive the output; otherwise, . + + + + An implementation for + has not been provided. + The key could not be exported. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + The byte span to receive the X.509 SubjectPublicKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + When overridden in a derived class, attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer. + + if is big enough to receive the output; otherwise, . + + throws a by default. + + ]]> + + The key could not be exported. + A derived type has not overriden this member. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Boolean + + + + + + + The character span to receive the PEM-encoded X.509 SubjectPublicKeyInfo data. + When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PEM-encoded X.509 SubjectPublicKeyInfo format into a provided buffer. + + if is big enough to receive the output; otherwise, . + + + + An implementation for + has not been provided. + The key could not be exported. + + + + diff --git a/xml/System.Security.Cryptography/AuthenticationTagMismatchException.xml b/xml/System.Security.Cryptography/AuthenticationTagMismatchException.xml index fb2a2ee9d93..86ed895f28c 100644 --- a/xml/System.Security.Cryptography/AuthenticationTagMismatchException.xml +++ b/xml/System.Security.Cryptography/AuthenticationTagMismatchException.xml @@ -1,93 +1,93 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.CryptographicException - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - To be added. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - To be added. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.CryptographicException + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + The exception that is thrown when a decryption operation with an authenticated cipher has an authentication tag mismatch. + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + Initializes a new instance of the class with default properties. + To be added. + + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + + + The error message that explains the reason for the exception. + Initializes a new instance of the class with a specified error message. + To be added. + + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + + + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception. If the parameter is not , the current exception is raised in a catch block that handles the inner exception. + Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + To be added. + + + + diff --git a/xml/System.Security.Cryptography/CryptoStream.xml b/xml/System.Security.Cryptography/CryptoStream.xml index d1c00ae1fc9..42b7ba69881 100644 --- a/xml/System.Security.Cryptography/CryptoStream.xml +++ b/xml/System.Security.Cryptography/CryptoStream.xml @@ -1,1928 +1,1928 @@ - - - - - - - - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.IO.Stream - - - - System.IDisposable - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Runtime.InteropServices.ComVisible(true)] - [<System.Runtime.InteropServices.ComVisible(true)>] - - - - Defines a stream that links data streams to cryptographic transformations. - - . Any cryptographic objects that implement can be chained together with any objects that implement , so the streamed output from one object can be fed into the input of another object. The intermediate result (the output from the first object) does not need to be stored separately. - -> [!IMPORTANT] -> - This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly by calling its method, which in turn calls its implementation. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. -> - When `Stream.Read` or `Stream.ReadAsync` is called with a buffer of length `N`, the operation completes when either: -> -> - At least one byte has been read from the stream, or -> - The underlying stream that it wraps returns 0 from a call to `Read`, indicating no more data is available. -> -> Also, when `Stream.Read` or `Stream.ReadAsync` is called with a buffer of length 0, the operation succeeds once a call with a non-zero buffer would succeed. - -Prior to .NET 6, `Stream.Read` and `Stream.ReadAsync` did not return until `N` bytes had been read from the stream or the underlying stream returned 0 from a call to `Read`. If your code assumed they wouldn't return until all `N` bytes were read, it could fail to read all the content. For more information, see [Partial and zero-byte reads in streams](/dotnet/core/compatibility/core-libraries/6.0/partial-byte-reads-in-streams). - -You should always explicitly close your object after you are done using it by calling the method. Doing so flushes the underlying stream and causes all remaining blocks of data to be processed by the object. However, if an exception occurs before you call the method, the object might not be closed. To ensure that the method always gets called, place your call to the method within the `finally` block of a `try`/`catch` statement. - -## Examples - The following example demonstrates how to use a to encrypt a string. This method uses class with the specified and initialization vector (). - - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CryptoStream/Overview/fileexample.cs" interactive="try-dotnet" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/cryptography.rijndael.create.file/vb/fileexample.vb" id="Snippet1"::: - - ]]> - - Cryptographic Services - Partial and zero-byte reads in DeflateStream, GZipStream, and CryptoStream - - - - - - - - - - Constructor - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - The stream on which to perform the cryptographic transformation. - The cryptographic transformation that is to be performed on the stream. - One of the values. - Initializes a new instance of the class with a target data stream, the transformation to use, and the mode of the stream. - - can be passed into the `stream` parameter. Any object that implements (such as ) can be passed into the `transform` parameter. - - ]]> - - - is invalid. - Cryptographic Services - - - - - - - - - - Constructor - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 4.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - The stream on which to perform the cryptographic transformation. - The cryptographic transformation that is to be performed on the stream. - The mode of the stream. - - to not close the underlying stream when the object is disposed; otherwise, . - Initializes a new instance of the class. - To be added. - - is invalid. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.IAsyncResult - - - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - The buffer to read the data into. - The byte offset in at which to begin writing data read from the stream. - The maximum number of bytes to read. - An optional asynchronous callback, to be called when the read is complete. - A user-provided object that distinguishes this particular asynchronous read request from other requests. - Begins an asynchronous read operation. (Consider using instead.) - An that represents the asynchronous read, which could still be pending. - - and to implement asynchronous I/O operations. These methods are still available in .NET to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. - - Pass the `IAsyncResult` return value to the method of the stream to determine how many bytes were read and to release operating system resources used for reading. must be called once for every call to . You can do this either by using the same code that called `BeginRead` or in a callback passed to `BeginRead`. - - The current position in the stream is updated when the asynchronous read or write is issued, not when the I/O operation completes. - - Multiple simultaneous asynchronous requests render the request completion order uncertain. - - Use the property to determine whether the current instance supports reading. - - If a stream is closed or you pass an invalid argument, exceptions are thrown immediately from `BeginRead`. Errors that occur during an asynchronous read request, such as a disk failure during the I/O request, occur on the thread pool thread and throw exceptions when calling `EndRead`. - - ]]> - - Attempted an asynchronous read past the end of the stream, or a disk error occurred. - One or more of the arguments is invalid. - Methods were called after the stream was closed. - The current implementation does not support the read operation. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.IAsyncResult - - - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - The buffer to write data from. - The byte offset in from which to begin writing. - The maximum number of bytes to write. - An optional asynchronous callback, to be called when the write is complete. - A user-provided object that distinguishes this particular asynchronous write request from other requests. - Begins an asynchronous write operation. (Consider using instead.) - An that represents the asynchronous write, which could still be pending. - - and to implement asynchronous I/O operations. These methods are still available in .NET to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. - - Pass the `IAsyncResult` returned by the current method to to ensure that the write completes and frees resources appropriately. must be called once for every call to . You can do this either by using the same code that called `BeginWrite` or in a callback passed to `BeginWrite`. If an error occurs during an asynchronous write, an exception will not be thrown until `EndWrite` is called with the `IAsyncResult` returned by this method. - - If a stream is writable, writing at the end of the stream expands the stream. - - The current position in the stream is updated when you issue the asynchronous read or write, not when the I/O operation completes. Multiple simultaneous asynchronous requests render the request completion order uncertain. - - Use the property to determine whether the current instance supports writing. - - If a stream is closed or you pass an invalid argument, exceptions are thrown immediately from `BeginWrite`. Errors that occur during an asynchronous write request, such as a disk failure during the I/O request, occur on the thread pool thread and throw exceptions when calling `EndWrite`. - - ]]> - - Attempted an asynchronous write past the end of the stream, or a disk error occurred. - One or more of the arguments is invalid. - Methods were called after the stream was closed. - The current implementation does not support the write operation. - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - Gets a value indicating whether the current is readable. - - if the current stream is readable; otherwise, . - To be added. - Cryptographic Services - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - Gets a value indicating whether you can seek within the current . - Always . - - , so this method always returns `false`. - - ]]> - - Cryptographic Services - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - Gets a value indicating whether the current is writable. - - if the current stream is writable; otherwise, . - To be added. - Cryptographic Services - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - Releases all resources used by the . - - implementation. - - Calling `Dispose` allows the resources used by the to be reallocated for other purposes. For more information about `Dispose`, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 6.0.0.0 - - - mscorlib - - - netstandard - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - The stream to which the contents of the current stream will be copied. - The size, in bytes, of the buffer to use for reading from the underlying stream. This value must be greater than zero. The default size is 81920 bytes. - Reads the bytes from the underlying stream, applies the relevant cryptographic transforms, and writes the result to the destination stream. - - - - - is . - - is negative or zero. - The current stream does not support reading. - - -or- - - does not support writing. - Either the current stream or were closed before the method was called. - An I/O error occurred. - An error occurred during a cryptographic operation. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 6.0.0.0 - - - mscorlib - - - netstandard - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Threading.Tasks.Task - - - - - - - - The stream to which the contents of the current stream will be copied. - The size, in bytes, of the buffer. This value must be greater than zero. The default size is 81920. - The token to monitor for cancellation requests. The default value is . - Asynchronously reads the bytes from the underlying stream, applies the relevant cryptographic transforms, and writes the result to the destination stream. - A task that represents the asynchronous copy operation. - - , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . - -]]> - - - is . - - is negative or zero. - Either the current stream or the destination stream is disposed. - The current stream does not support reading, or the destination stream does not support writing. - An error occurred during a cryptographic operation. - - - - - - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - to release both managed and unmanaged resources; to release only unmanaged resources. - Releases the unmanaged resources used by the and optionally releases the managed resources. - - method, if it has been overridden. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. `Finalize` invokes `Dispose` with disposing set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - - ]]> - - - - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Threading.Tasks.ValueTask - - - - Asynchronously releases the unmanaged resources used by the . - A task that represents the asynchronous dispose operation. - - method enables you to perform a resource-intensive dispose operation without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. - - This method disposes the stream by writing any changes to the backing store and closing the stream to release resources. - - Calling `DisposeAsync` allows the resources used by the to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). - - ]]> - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - - - - The reference to the pending asynchronous request to finish. - Waits for the pending asynchronous read to complete. (Consider using instead.) - The number of bytes read from the stream, between zero (0) and the number of bytes you requested. Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is available. - - and to implement asynchronous I/O operations. These methods are still available in .NET to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. - - Call `EndRead` to determine how many bytes were read from the stream. - - `EndRead` can be called once on every from . - - This method blocks until the I/O operation has completed. - - ]]> - - - is . - A handle to the pending read operation is not available. - - -or- - - The pending operation does not support reading. - - did not originate from a method on the current stream. - The stream is closed or an internal error has occurred. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - A reference to the outstanding asynchronous I/O request. - Ends an asynchronous write operation. (Consider using instead.) - - and to implement asynchronous I/O operations. These methods are still available in .NET to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. - - `EndWrite` must be called exactly once on every from . - - This method blocks until the I/O operation has completed. Errors that occur during an asynchronous write request, such as a disk failure during the I/O request, occur on the thread pool thread and become visible upon a call to `EndWrite`. Exceptions thrown by the thread pool thread will not be visible when calling `EndWrite`. - - ]]> - - - is . - A handle to the pending write operation is not available. - - -or- - - The pending operation does not support writing. - - did not originate from a method on the current stream. - The stream is closed or an internal error has occurred. - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - Clears all buffers for the current stream and causes any buffered data to be written to the underlying device. - - or . Setting to `true` means that data will be flushed from the buffer to the stream, but the encoder state will not be flushed. This allows the encoder to keep its state (partial characters) so that it can encode the next block of characters correctly. This scenario affects UTF8 and UTF7 where certain characters can only be encoded after the encoder receives the adjacent character or characters. - -> [!NOTE] -> You should call either the method or the method to complete flushing the buffer. - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Threading.Tasks.Task - - - - - - The token to monitor for cancellation requests. The default value is . - Clears all buffers for the current stream asynchronously, causes any buffered data to be written to the underlying device, and monitors cancellation requests. - A task that represents the asynchronous flush operation. - - with the `await` (C#) or `Await` (Visual Basic) operator to suspend execution of the method until the task is complete. For more information, see [Asynchronous programming (C#)](/dotnet/csharp/async) or [Asynchronous programming with Async and Await (Visual Basic)](/dotnet/visual-basic/programming-guide/concepts/async/). - - If the operation is canceled before it completes, the returned task contains the value for the property. - - This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . - -]]> - - The stream has been disposed. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - Updates the underlying data source or repository with the current state of the buffer, then clears the buffer. - - method will call . If you do not call , call to complete flushing the buffer. Call only when all stream activity is complete. - - ]]> - - The key is corrupt which can cause invalid padding to the stream. - The current stream is not writable. - - -or- - - The final block has already been transformed. - Cryptographic Services - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - System.Threading.Tasks.ValueTask - - - - - - The token to monitor for cancellation requests. The default value is . - Asynchronously updates the underlying data source or repository with the current state of the buffer, then clears the buffer. - A task that represents the asynchronous flush operation. - This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - Gets a value indicating whether the final buffer block has been written to the underlying stream. - - if the final block has been flushed; otherwise, . - - method is called. - - ]]> - - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int64 - - - Gets the length in bytes of the stream. - This property is not supported. - - , and cannot be used. - - ]]> - - This property is not supported. - Cryptographic Services - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int64 - - - Gets or sets the position within the current stream. - This property is not supported. - - , and cannot be used. - - ]]> - - This property is not supported. - Cryptographic Services - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Int32 - - - - - - - - An array of bytes. A maximum of bytes are read from the current stream and stored in . - The byte offset in at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. - The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream has been reached. - To be added. - The associated with current object does not match the underlying stream. For example, this exception is thrown when using with an underlying stream that is write only. - The parameter is less than zero. - - -or- - - The parameter is less than zero. - The sum of the and parameters is longer than the length of the buffer. - Cryptographic Services - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 6.0.0.0 - - - mscorlib - - - netstandard - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Threading.Tasks.ValueTask<System.Int32> - - - - - - - The region of memory to write the data into. - The token to monitor for cancellation requests. The default value is . - Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests. - A task that represents the asynchronous read operation. The value of its property contains the total number of bytes read into the buffer. The result value can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or it can be 0 (zero) if the end of the stream has been reached. - To be added. - The associated with current object does not match the underlying stream. For example, this exception is thrown when using with an underlying stream that is write only. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Threading.Tasks.Task<System.Int32> - - - - - - - - - The buffer to write the data into. - The byte offset in at which to begin writing data from the stream. - The maximum number of bytes to read. - The token to monitor for cancellation requests. The default value is . - Reads a sequence of bytes from the current stream asynchronously, advances the position within the stream by the number of bytes read, and monitors cancellation requests. - A task that represents the asynchronous read operation. The value of the task object's parameter contains the total number of bytes read into the buffer. The result can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the stream has been reached. - - with the `await` (C#) or `Await` (Visual Basic) operator to suspend execution of the method until the task is complete. For more information, see [Asynchronous programming (C#)](/dotnet/csharp/async) or [Asynchronous programming with Async and Await (Visual Basic)](/dotnet/visual-basic/programming-guide/concepts/async/). - - If the operation is canceled before it completes, the returned task contains the value for the property. - - This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . - -]]> - - - is . - - or is negative. - The sum of and is larger than the buffer length. - The stream does not support reading. - The stream has been disposed. - The stream is currently in use by a previous read operation. - Cancellation - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - - Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. - The unsigned byte cast to an , or -1 if at the end of the stream. - - property to determine whether the current instance supports reading. - - Attempts to manipulate the stream after the stream has been closed could throw an . - - ]]> - - The stream does not support reading. - Methods were called after the stream was closed. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int64 - - - - - - - A byte offset relative to the parameter. - A object indicating the reference point used to obtain the new position. - Sets the position within the current stream. - This method is not supported. - - , and cannot be used. - - ]]> - - This method is not supported. - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The desired length of the current stream in bytes. - Sets the length of the current stream. - - , and cannot be used. - - ]]> - - This property exists only to support inheritance from , and cannot be used. - Cryptographic Services - - - - - - - - - - Method - - M:System.IDisposable.Dispose - - - mscorlib - 1.0.5000.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - Releases the resources used by the current instance of the class. - - instance is cast to an interface. - - ]]> - - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Void - - - - - - - - An array of bytes. This method copies bytes from to the current stream. - The byte offset in at which to begin copying bytes to the current stream. - The number of bytes to be written to the current stream. - Writes a sequence of bytes to the current and advances the current position within the stream by the number of bytes written. - To be added. - The associated with current object does not match the underlying stream. For example, this exception is thrown when using with an underlying stream that is read only. - The parameter is less than zero. - - -or- - - The parameter is less than zero. - The sum of the and parameters is longer than the length of the buffer. - Cryptographic Services - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 6.0.0.0 - - - mscorlib - - - netstandard - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Threading.Tasks.ValueTask - - - - - - - The region of memory to write data from. - The token to monitor for cancellation requests. The default value is . - Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests. - A task that represents the asynchronous write operation. - To be added. - The associated with current object does not match the underlying stream. For example, this exception is thrown when using with an underlying stream that is read only. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Threading.Tasks.Task - - - - - - - - - The buffer to write data from. - The zero-based byte offset in from which to begin writing bytes to the stream. - The maximum number of bytes to write. - The token to monitor for cancellation requests. The default value is . - Writes a sequence of bytes to the current stream asynchronously, advances the current position within the stream by the number of bytes written, and monitors cancellation requests. - A task that represents the asynchronous write operation. - - with the `await` (C#) or `Await` (Visual Basic) operator to suspend execution of the method until the task is complete. For more information, see [Asynchronous programming (C#)](/dotnet/csharp/async) or [Asynchronous programming with Async and Await (Visual Basic)](/dotnet/visual-basic/programming-guide/concepts/async/). - - If the operation is canceled before it completes, the returned task contains the value for the property. - - This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . - -]]> - - - is . - - or is negative. - The sum of and is larger than the buffer length. - The stream does not support writing. - The stream has been disposed. - The stream is currently in use by a previous write operation. - Cancellation - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The byte to write to the stream. - Writes a byte to the current position in the stream and advances the position within the stream by one byte. - - property to determine whether the current instance supports writing. - - ]]> - - An I/O error occurs. - The stream does not support writing, or the stream is already closed. - Methods were called after the stream was closed. - - - - + + + + + + + + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.IO.Stream + + + + System.IDisposable + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Runtime.InteropServices.ComVisible(true)] + [<System.Runtime.InteropServices.ComVisible(true)>] + + + + Defines a stream that links data streams to cryptographic transformations. + + . Any cryptographic objects that implement can be chained together with any objects that implement , so the streamed output from one object can be fed into the input of another object. The intermediate result (the output from the first object) does not need to be stored separately. + +> [!IMPORTANT] +> - This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly by calling its method, which in turn calls its implementation. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> - When `Stream.Read` or `Stream.ReadAsync` is called with a buffer of length `N`, the operation completes when either: +> +> - At least one byte has been read from the stream, or +> - The underlying stream that it wraps returns 0 from a call to `Read`, indicating no more data is available. +> +> Also, when `Stream.Read` or `Stream.ReadAsync` is called with a buffer of length 0, the operation succeeds once a call with a non-zero buffer would succeed. + +Prior to .NET 6, `Stream.Read` and `Stream.ReadAsync` did not return until `N` bytes had been read from the stream or the underlying stream returned 0 from a call to `Read`. If your code assumed they wouldn't return until all `N` bytes were read, it could fail to read all the content. For more information, see [Partial and zero-byte reads in streams](/dotnet/core/compatibility/core-libraries/6.0/partial-byte-reads-in-streams). + +You should always explicitly close your object after you are done using it by calling the method. Doing so flushes the underlying stream and causes all remaining blocks of data to be processed by the object. However, if an exception occurs before you call the method, the object might not be closed. To ensure that the method always gets called, place your call to the method within the `finally` block of a `try`/`catch` statement. + +## Examples + The following example demonstrates how to use a to encrypt a string. This method uses class with the specified and initialization vector (). + + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CryptoStream/Overview/fileexample.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/cryptography.rijndael.create.file/vb/fileexample.vb" id="Snippet1"::: + + ]]> + + Cryptographic Services + Partial and zero-byte reads in DeflateStream, GZipStream, and CryptoStream + + + + + + + + + + Constructor + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + The stream on which to perform the cryptographic transformation. + The cryptographic transformation that is to be performed on the stream. + One of the values. + Initializes a new instance of the class with a target data stream, the transformation to use, and the mode of the stream. + + can be passed into the `stream` parameter. Any object that implements (such as ) can be passed into the `transform` parameter. + + ]]> + + + is invalid. + Cryptographic Services + + + + + + + + + + Constructor + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 4.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + The stream on which to perform the cryptographic transformation. + The cryptographic transformation that is to be performed on the stream. + The mode of the stream. + + to not close the underlying stream when the object is disposed; otherwise, . + Initializes a new instance of the class. + To be added. + + is invalid. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.IAsyncResult + + + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + The buffer to read the data into. + The byte offset in at which to begin writing data read from the stream. + The maximum number of bytes to read. + An optional asynchronous callback, to be called when the read is complete. + A user-provided object that distinguishes this particular asynchronous read request from other requests. + Begins an asynchronous read operation. (Consider using instead.) + An that represents the asynchronous read, which could still be pending. + + and to implement asynchronous I/O operations. These methods are still available in .NET to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. + + Pass the `IAsyncResult` return value to the method of the stream to determine how many bytes were read and to release operating system resources used for reading. must be called once for every call to . You can do this either by using the same code that called `BeginRead` or in a callback passed to `BeginRead`. + + The current position in the stream is updated when the asynchronous read or write is issued, not when the I/O operation completes. + + Multiple simultaneous asynchronous requests render the request completion order uncertain. + + Use the property to determine whether the current instance supports reading. + + If a stream is closed or you pass an invalid argument, exceptions are thrown immediately from `BeginRead`. Errors that occur during an asynchronous read request, such as a disk failure during the I/O request, occur on the thread pool thread and throw exceptions when calling `EndRead`. + + ]]> + + Attempted an asynchronous read past the end of the stream, or a disk error occurred. + One or more of the arguments is invalid. + Methods were called after the stream was closed. + The current implementation does not support the read operation. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.IAsyncResult + + + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + The buffer to write data from. + The byte offset in from which to begin writing. + The maximum number of bytes to write. + An optional asynchronous callback, to be called when the write is complete. + A user-provided object that distinguishes this particular asynchronous write request from other requests. + Begins an asynchronous write operation. (Consider using instead.) + An that represents the asynchronous write, which could still be pending. + + and to implement asynchronous I/O operations. These methods are still available in .NET to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. + + Pass the `IAsyncResult` returned by the current method to to ensure that the write completes and frees resources appropriately. must be called once for every call to . You can do this either by using the same code that called `BeginWrite` or in a callback passed to `BeginWrite`. If an error occurs during an asynchronous write, an exception will not be thrown until `EndWrite` is called with the `IAsyncResult` returned by this method. + + If a stream is writable, writing at the end of the stream expands the stream. + + The current position in the stream is updated when you issue the asynchronous read or write, not when the I/O operation completes. Multiple simultaneous asynchronous requests render the request completion order uncertain. + + Use the property to determine whether the current instance supports writing. + + If a stream is closed or you pass an invalid argument, exceptions are thrown immediately from `BeginWrite`. Errors that occur during an asynchronous write request, such as a disk failure during the I/O request, occur on the thread pool thread and throw exceptions when calling `EndWrite`. + + ]]> + + Attempted an asynchronous write past the end of the stream, or a disk error occurred. + One or more of the arguments is invalid. + Methods were called after the stream was closed. + The current implementation does not support the write operation. + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + Gets a value indicating whether the current is readable. + + if the current stream is readable; otherwise, . + To be added. + Cryptographic Services + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + Gets a value indicating whether you can seek within the current . + Always . + + , so this method always returns `false`. + + ]]> + + Cryptographic Services + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + Gets a value indicating whether the current is writable. + + if the current stream is writable; otherwise, . + To be added. + Cryptographic Services + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + Releases all resources used by the . + + implementation. + + Calling `Dispose` allows the resources used by the to be reallocated for other purposes. For more information about `Dispose`, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 6.0.0.0 + + + mscorlib + + + netstandard + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + The stream to which the contents of the current stream will be copied. + The size, in bytes, of the buffer to use for reading from the underlying stream. This value must be greater than zero. The default size is 81920 bytes. + Reads the bytes from the underlying stream, applies the relevant cryptographic transforms, and writes the result to the destination stream. + + + + + is . + + is negative or zero. + The current stream does not support reading. + + -or- + + does not support writing. + Either the current stream or were closed before the method was called. + An I/O error occurred. + An error occurred during a cryptographic operation. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 6.0.0.0 + + + mscorlib + + + netstandard + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Threading.Tasks.Task + + + + + + + + The stream to which the contents of the current stream will be copied. + The size, in bytes, of the buffer. This value must be greater than zero. The default size is 81920. + The token to monitor for cancellation requests. The default value is . + Asynchronously reads the bytes from the underlying stream, applies the relevant cryptographic transforms, and writes the result to the destination stream. + A task that represents the asynchronous copy operation. + + , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . + +]]> + + + is . + + is negative or zero. + Either the current stream or the destination stream is disposed. + The current stream does not support reading, or the destination stream does not support writing. + An error occurred during a cryptographic operation. + + + + + + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + to release both managed and unmanaged resources; to release only unmanaged resources. + Releases the unmanaged resources used by the and optionally releases the managed resources. + + method, if it has been overridden. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. `Finalize` invokes `Dispose` with disposing set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + + ]]> + + + + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + + For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Threading.Tasks.ValueTask + + + + Asynchronously releases the unmanaged resources used by the . + A task that represents the asynchronous dispose operation. + + method enables you to perform a resource-intensive dispose operation without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#. + + This method disposes the stream by writing any changes to the backing store and closing the stream to release resources. + + Calling `DisposeAsync` allows the resources used by the to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + + ]]> + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + + + + The reference to the pending asynchronous request to finish. + Waits for the pending asynchronous read to complete. (Consider using instead.) + The number of bytes read from the stream, between zero (0) and the number of bytes you requested. Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is available. + + and to implement asynchronous I/O operations. These methods are still available in .NET to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. + + Call `EndRead` to determine how many bytes were read from the stream. + + `EndRead` can be called once on every from . + + This method blocks until the I/O operation has completed. + + ]]> + + + is . + A handle to the pending read operation is not available. + + -or- + + The pending operation does not support reading. + + did not originate from a method on the current stream. + The stream is closed or an internal error has occurred. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + A reference to the outstanding asynchronous I/O request. + Ends an asynchronous write operation. (Consider using instead.) + + and to implement asynchronous I/O operations. These methods are still available in .NET to support legacy code; however, the new async methods, such as , , , and , help you implement asynchronous I/O operations more easily. + + `EndWrite` must be called exactly once on every from . + + This method blocks until the I/O operation has completed. Errors that occur during an asynchronous write request, such as a disk failure during the I/O request, occur on the thread pool thread and become visible upon a call to `EndWrite`. Exceptions thrown by the thread pool thread will not be visible when calling `EndWrite`. + + ]]> + + + is . + A handle to the pending write operation is not available. + + -or- + + The pending operation does not support writing. + + did not originate from a method on the current stream. + The stream is closed or an internal error has occurred. + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + Clears all buffers for the current stream and causes any buffered data to be written to the underlying device. + + or . Setting to `true` means that data will be flushed from the buffer to the stream, but the encoder state will not be flushed. This allows the encoder to keep its state (partial characters) so that it can encode the next block of characters correctly. This scenario affects UTF8 and UTF7 where certain characters can only be encoded after the encoder receives the adjacent character or characters. + +> [!NOTE] +> You should call either the method or the method to complete flushing the buffer. + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Threading.Tasks.Task + + + + + + The token to monitor for cancellation requests. The default value is . + Clears all buffers for the current stream asynchronously, causes any buffered data to be written to the underlying device, and monitors cancellation requests. + A task that represents the asynchronous flush operation. + + with the `await` (C#) or `Await` (Visual Basic) operator to suspend execution of the method until the task is complete. For more information, see [Asynchronous programming (C#)](/dotnet/csharp/async) or [Asynchronous programming with Async and Await (Visual Basic)](/dotnet/visual-basic/programming-guide/concepts/async/). + + If the operation is canceled before it completes, the returned task contains the value for the property. + + This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . + +]]> + + The stream has been disposed. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + Updates the underlying data source or repository with the current state of the buffer, then clears the buffer. + + method will call . If you do not call , call to complete flushing the buffer. Call only when all stream activity is complete. + + ]]> + + The key is corrupt which can cause invalid padding to the stream. + The current stream is not writable. + + -or- + + The final block has already been transformed. + Cryptographic Services + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + System.Threading.Tasks.ValueTask + + + + + + The token to monitor for cancellation requests. The default value is . + Asynchronously updates the underlying data source or repository with the current state of the buffer, then clears the buffer. + A task that represents the asynchronous flush operation. + This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + Gets a value indicating whether the final buffer block has been written to the underlying stream. + + if the final block has been flushed; otherwise, . + + method is called. + + ]]> + + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int64 + + + Gets the length in bytes of the stream. + This property is not supported. + + , and cannot be used. + + ]]> + + This property is not supported. + Cryptographic Services + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int64 + + + Gets or sets the position within the current stream. + This property is not supported. + + , and cannot be used. + + ]]> + + This property is not supported. + Cryptographic Services + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Int32 + + + + + + + + An array of bytes. A maximum of bytes are read from the current stream and stored in . + The byte offset in at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream has been reached. + To be added. + The associated with current object does not match the underlying stream. For example, this exception is thrown when using with an underlying stream that is write only. + The parameter is less than zero. + + -or- + + The parameter is less than zero. + The sum of the and parameters is longer than the length of the buffer. + Cryptographic Services + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 6.0.0.0 + + + mscorlib + + + netstandard + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Threading.Tasks.ValueTask<System.Int32> + + + + + + + The region of memory to write the data into. + The token to monitor for cancellation requests. The default value is . + Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests. + A task that represents the asynchronous read operation. The value of its property contains the total number of bytes read into the buffer. The result value can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or it can be 0 (zero) if the end of the stream has been reached. + To be added. + The associated with current object does not match the underlying stream. For example, this exception is thrown when using with an underlying stream that is write only. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Threading.Tasks.Task<System.Int32> + + + + + + + + + The buffer to write the data into. + The byte offset in at which to begin writing data from the stream. + The maximum number of bytes to read. + The token to monitor for cancellation requests. The default value is . + Reads a sequence of bytes from the current stream asynchronously, advances the position within the stream by the number of bytes read, and monitors cancellation requests. + A task that represents the asynchronous read operation. The value of the task object's parameter contains the total number of bytes read into the buffer. The result can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the stream has been reached. + + with the `await` (C#) or `Await` (Visual Basic) operator to suspend execution of the method until the task is complete. For more information, see [Asynchronous programming (C#)](/dotnet/csharp/async) or [Asynchronous programming with Async and Await (Visual Basic)](/dotnet/visual-basic/programming-guide/concepts/async/). + + If the operation is canceled before it completes, the returned task contains the value for the property. + + This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . + +]]> + + + is . + + or is negative. + The sum of and is larger than the buffer length. + The stream does not support reading. + The stream has been disposed. + The stream is currently in use by a previous read operation. + Cancellation + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + + Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. + The unsigned byte cast to an , or -1 if at the end of the stream. + + property to determine whether the current instance supports reading. + + Attempts to manipulate the stream after the stream has been closed could throw an . + + ]]> + + The stream does not support reading. + Methods were called after the stream was closed. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int64 + + + + + + + A byte offset relative to the parameter. + A object indicating the reference point used to obtain the new position. + Sets the position within the current stream. + This method is not supported. + + , and cannot be used. + + ]]> + + This method is not supported. + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The desired length of the current stream in bytes. + Sets the length of the current stream. + + , and cannot be used. + + ]]> + + This property exists only to support inheritance from , and cannot be used. + Cryptographic Services + + + + + + + + + + Method + + M:System.IDisposable.Dispose + + + mscorlib + 1.0.5000.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + Releases the resources used by the current instance of the class. + + instance is cast to an interface. + + ]]> + + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Void + + + + + + + + An array of bytes. This method copies bytes from to the current stream. + The byte offset in at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + Writes a sequence of bytes to the current and advances the current position within the stream by the number of bytes written. + To be added. + The associated with current object does not match the underlying stream. For example, this exception is thrown when using with an underlying stream that is read only. + The parameter is less than zero. + + -or- + + The parameter is less than zero. + The sum of the and parameters is longer than the length of the buffer. + Cryptographic Services + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 6.0.0.0 + + + mscorlib + + + netstandard + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Threading.Tasks.ValueTask + + + + + + + The region of memory to write data from. + The token to monitor for cancellation requests. The default value is . + Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests. + A task that represents the asynchronous write operation. + To be added. + The associated with current object does not match the underlying stream. For example, this exception is thrown when using with an underlying stream that is read only. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Threading.Tasks.Task + + + + + + + + + The buffer to write data from. + The zero-based byte offset in from which to begin writing bytes to the stream. + The maximum number of bytes to write. + The token to monitor for cancellation requests. The default value is . + Writes a sequence of bytes to the current stream asynchronously, advances the current position within the stream by the number of bytes written, and monitors cancellation requests. + A task that represents the asynchronous write operation. + + with the `await` (C#) or `Await` (Visual Basic) operator to suspend execution of the method until the task is complete. For more information, see [Asynchronous programming (C#)](/dotnet/csharp/async) or [Asynchronous programming with Async and Await (Visual Basic)](/dotnet/visual-basic/programming-guide/concepts/async/). + + If the operation is canceled before it completes, the returned task contains the value for the property. + + This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . + +]]> + + + is . + + or is negative. + The sum of and is larger than the buffer length. + The stream does not support writing. + The stream has been disposed. + The stream is currently in use by a previous write operation. + Cancellation + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The byte to write to the stream. + Writes a byte to the current position in the stream and advances the position within the stream by one byte. + + property to determine whether the current instance supports writing. + + ]]> + + An I/O error occurs. + The stream does not support writing, or the stream is already closed. + Methods were called after the stream was closed. + + + + diff --git a/xml/System.Security.Cryptography/DSACng.xml b/xml/System.Security.Cryptography/DSACng.xml index 5233d37f931..085885c3411 100644 --- a/xml/System.Security.Cryptography/DSACng.xml +++ b/xml/System.Security.Cryptography/DSACng.xml @@ -1,1054 +1,1057 @@ - - - - - - - - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - System.Security.Cryptography.DSA - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - Provides a Cryptography Next Generation (CNG) implementation of the Digital Signature Algorithm (DSA). - To be added. - - - - - System.Core - 4.0.0.0 - - - Initializes a new instance of the class. - - - - - - - - - Constructor - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - - - Initializes a new instance of the class with a random 2,048-bit key pair. - To be added. - - - - - - - - - - Constructor - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - - - - - The size of the key to generate in bits. - Initializes a new instance of the class with a randomly generated key of the specified size. - - [!IMPORTANT] -> The creators of the DSA algorithm have withdrawn their support for it. Consider using the class or the class instead of the class. Use only for compatibility with legacy applications and data. - - ]]> - - - is not valid. - - - - - - - - - - Constructor - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - - - - The key to use for DSA operations. - Initializes a new instance of the class with the specified key. - - of `key` must be . - - This constructor creates a copy of the key. Even if `key` is disposed, the copy of this key object in DSA remains alive. - - ]]> - - - is not a valid DSA key. - - is . - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - The hash value to be signed. - Creates the signature for the specified data. - The digital signature for the specified data. - To be added. - - is . - This instance represents only a public key. - --or- - -An error occurred during signature creation. - - - is shorter in length than the Q value of the DSA key. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - to release managed and unmanaged resources; to release only unmanaged resources. - Releases the resources used by the current instance of the class. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.DSAParameters - - - - - - - to include private parameters; otherwise, . - Exports the DSA algorithm parameters. - The DSA algorithm parameters. - To be added. - DSA key is not a valid public or private key. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - - - System.Byte[] - - - - - - - The binary stream to hash. - The algorithm to use to hash the data. - Computes the hash value of a specified binary stream by using a specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - - - System.Byte[] - - - - - - - - - The data to be hashed. - The index of the first byte in that is to be hashed. - The number of bytes to hash. - The algorithm to use to hash the data. - When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The DSA parameters. - Replaces the existing key that the current instance is working with by creating a new for the parameters structure. - To be added. - The specified DSA parameters are not valid. - - - - - - - - - - Property - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.CngKey - - - Gets the key that will be used by the object for any cryptographic operation that it performs. - The key used by the object to perform cryptographic operations. - - object is disposed if the key is reset, for instance by changing the property, by using the method to create a new key, or by disposing the parent object. Therefore, you should ensure that the key object is no longer used in these cases. - - This object is not the same as the object passed to the constructor, if that constructor was used. However, it will point to the same CNG key. - - ]]> - - - - - - - - - - - - Property - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.String - - - Gets the name of the key exchange algorithm. - Always . - To be added. - - - - - - - - - - Property - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.KeySizes[] - - - Gets the key sizes, in bits, that are supported by the DSA algorithm. - An array that contains the key sizes supported by the algorithm. - To be added. - - - - - - - - - - Property - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.String - - - Gets the name of the signature algorithm. - The string "DSA". - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - The signed hash. - The digital signature to be verified. - Verifies if the specified digital signature matches the specified hash. - - if matches the signature computed using the specified hash; otherwise, . - To be added. - The or parameters are . - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - + + + + + + + + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + System.Security.Cryptography.DSA + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Provides a Cryptography Next Generation (CNG) implementation of the Digital Signature Algorithm (DSA). + To be added. + + + + + System.Core + 4.0.0.0 + + + Initializes a new instance of the class. + + + + + + + + + Constructor + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + + + Initializes a new instance of the class with a random 2,048-bit key pair. + To be added. + + + + + + + + + + Constructor + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + + + + + The size of the key to generate in bits. + Initializes a new instance of the class with a randomly generated key of the specified size. + + [!IMPORTANT] +> The creators of the DSA algorithm have withdrawn their support for it. Consider using the class or the class instead of the class. Use only for compatibility with legacy applications and data. + + ]]> + + + is not valid. + + + + + + + + + + Constructor + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + + + + The key to use for DSA operations. + Initializes a new instance of the class with the specified key. + + of `key` must be . + + This constructor creates a copy of the key. Even if `key` is disposed, the copy of this key object in DSA remains alive. + + ]]> + + + is not a valid DSA key. + + is . + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + The hash value to be signed. + Creates the signature for the specified data. + The digital signature for the specified data. + To be added. + + is . + This instance represents only a public key. + +-or- + +An error occurred during signature creation. + + + is shorter in length than the Q value of the DSA key. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + to release managed and unmanaged resources; to release only unmanaged resources. + Releases the resources used by the current instance of the class. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + To be added. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.DSAParameters + + + + + + + to include private parameters; otherwise, . + Exports the DSA algorithm parameters. + The DSA algorithm parameters. + To be added. + DSA key is not a valid public or private key. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + + + System.Byte[] + + + + + + + The binary stream to hash. + The algorithm to use to hash the data. + Computes the hash value of a specified binary stream by using a specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + + + System.Byte[] + + + + + + + + + The data to be hashed. + The index of the first byte in that is to be hashed. + The number of bytes to hash. + The algorithm to use to hash the data. + When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The bytes to use as a password when decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The password to use for decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The DSA parameters. + Replaces the existing key that the current instance is working with by creating a new for the parameters structure. + To be added. + The specified DSA parameters are not valid. + + + + + + + + + + Property + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.CngKey + + + Gets the key that will be used by the object for any cryptographic operation that it performs. + The key used by the object to perform cryptographic operations. + + object is disposed if the key is reset, for instance by changing the property, by using the method to create a new key, or by disposing the parent object. Therefore, you should ensure that the key object is no longer used in these cases. + + This object is not the same as the object passed to the constructor, if that constructor was used. However, it will point to the same CNG key. + + ]]> + + + + + + + + + + + + Property + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.String + + + Gets the name of the key exchange algorithm. + Always . + To be added. + + + + + + + + + + Property + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.KeySizes[] + + + Gets the key sizes, in bits, that are supported by the DSA algorithm. + An array that contains the key sizes supported by the algorithm. + To be added. + + + + + + + + + + Property + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.String + + + Gets the name of the signature algorithm. + The string "DSA". + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The byte span to receive the PKCS#8 PrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + The signed hash. + The digital signature to be verified. + Verifies if the specified digital signature matches the specified hash. + + if matches the signature computed using the specified hash; otherwise, . + To be added. + The or parameters are . + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + diff --git a/xml/System.Security.Cryptography/DSACryptoServiceProvider.xml b/xml/System.Security.Cryptography/DSACryptoServiceProvider.xml index 7c5c7f0ced1..deacda6541d 100644 --- a/xml/System.Security.Cryptography/DSACryptoServiceProvider.xml +++ b/xml/System.Security.Cryptography/DSACryptoServiceProvider.xml @@ -1,1848 +1,1848 @@ - - - - - - - - - - - - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.Security.Cryptography.DSA - - - - System.Security.Cryptography.ICspAsymmetricAlgorithm - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Runtime.InteropServices.ComVisible(true)] - [<System.Runtime.InteropServices.ComVisible(true)>] - - - - Defines a wrapper object to access the cryptographic service provider (CSP) implementation of the algorithm. This class cannot be inherited. - - class to create digital signatures and protect the integrity of your data. - - To use a public-key system to digitally sign a message, the sender first applies a hash function to the message to create a message digest. The sender then encrypts the message digest with the sender's private key to create the sender's personal signature. Upon receiving the message and signature, the receiver decrypts the signature using the sender's public key to recover the message digest and hashes the message using the same hash algorithm that the sender used. If the message digest that the receiver computes exactly matches the message digest received from the sender, the receiver can be sure that the message was not altered while in transit. Note that a signature can be verified by anyone, because the sender's public key is common knowledge. - -> [!NOTE] -> The creators of the DSA algorithm have withdrawn their support for it. Consider using the class instead of the class. Use only for compatibility with legacy applications and data. - - This algorithm supports key lengths from 512 bits to 1024 bits in increments of 64 bits. - - ]]> - - Cryptographic Services - - - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - Initializes a new instance of the class. - - - - - - - - - Constructor - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] - - - - - Initializes a new instance of the class. - To be added. - Cryptographic Services - - - - - - - - - - Constructor - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] - - - - - - - The size of the key for the asymmetric algorithm in bits. - Initializes a new instance of the class with the specified key size. - To be added. - Cryptographic Services - - - - - - - - - - - Constructor - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - - - - The parameters for the CSP. - Initializes a new instance of the class with the specified parameters for the cryptographic service provider (CSP). - To be added. - Cryptographic Services - - - - - - - - - - - Constructor - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - - - - - The size of the key for the cryptographic algorithm in bits. - The parameters for the CSP. - Initializes a new instance of the class with the specified key size and parameters for the cryptographic service provider (CSP). - To be added. - The CSP cannot be acquired. - - -or- - - The key cannot be created. - - is out of range. - Cryptographic Services - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - The data to be signed. - Creates the signature for the specified data. - The digital signature for the specified data. - To be added. - Cryptographic Services - - - - - - - - - - Property - - P:System.Security.Cryptography.ICspAsymmetricAlgorithm.CspKeyContainerInfo - - - mscorlib - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Runtime.InteropServices.ComVisible(false)] - [<System.Runtime.InteropServices.ComVisible(false)>] - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.CspKeyContainerInfo - - - Gets a object that describes additional information about a cryptographic key pair. - A object that describes additional information about a cryptographic key pair. - - property to retrieve additional information about a cryptographic key pair. The returned object describes whether the key is exportable, and specifies the key container name, information about the provider, and other information. - - In cases where a random key is generated, a key container will not be created until you call a method that uses the key. Some properties of the object returned by the property will throw a if a key container has not been created. To make sure that a key container has been created, call a method such as , , , , and so on, before you call the property. - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Void - - - - - - - to release managed and unmanaged resources; to release only unmanaged resources. - Releases the resources used by the current instance of the class. - To be added. - - - - - - - - - - Method - - M:System.Security.Cryptography.ICspAsymmetricAlgorithm.ExportCspBlob(System.Boolean) - - - mscorlib - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.InteropServices.ComVisible(false)] - [<System.Runtime.InteropServices.ComVisible(false)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - to include the private key; otherwise, . - Exports a blob containing the key information associated with a object. - A byte array containing the key information associated with a object. - - method returns a blob containing key information that is compatible with the unmanaged Microsoft Cryptographic API (CAPI). - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.DSAParameters - - - - - - - to include private parameters; otherwise, . - Exports the . - The parameters for . - To be added. - The key cannot be exported. - Cryptographic Services - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.5.0 - 4.0.0.0 - - - System.Security.Cryptography.Csp - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - Frees all resources associated with this instance. - To be added. - - - - - - - - - - Method - - mscorlib - 4.0.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - The binary stream to hash. - The algorithm to use to hash the data. - Computes the hash value of a specified binary stream by using a specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - mscorlib - 4.0.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - - The data to be hashed. - The index of the first byte in to be hashed. - The number of bytes to hash. - The algorithm to use to hash the data. - When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - M:System.Security.Cryptography.ICspAsymmetricAlgorithm.ImportCspBlob(System.Byte[]) - - - mscorlib - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.InteropServices.ComVisible(false)] - [<System.Runtime.InteropServices.ComVisible(false)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Void - - - - - - A byte array that represents a DSA key blob. - Imports a blob that represents DSA key information. - - method initializes the key data of a object using a blob that is compatible with the unmanaged Microsoft Cryptographic API (CAPI). - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Csp - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Csp - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Void - - - - - - The parameters for . - Imports the specified . - To be added. - The cryptographic service provider (CSP) cannot be acquired. - - -or- - - The parameter has missing fields. - Cryptographic Services - - - - - - - - - - - Property - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.String - - - Gets the name of the key exchange algorithm. - The name of the key exchange algorithm. - To be added. - Cryptographic Services - - - - - - - - - - Property - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - - System.Int32 - - - Gets the size of the key used by the asymmetric algorithm in bits. - The size of the key used by the asymmetric algorithm. - - class does not allow you to change key sizes using the property. Any value written to this property will fail to update the property without error. To change the key size, use one of the constructor overloads. - - ]]> - - Cryptographic Services - - - - - - - - - - Property - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.KeySizes[] - - - Gets the key sizes that are supported by the asymmetric algorithm. - Only key sizes that match an entry in this array are supported by the asymmetric algorithm. - - . - -This algorithm supports key lengths from 512 bits to 1024 bits in increments of 64 bits. - -]]> - - Cryptographic Services - - - - - - - - - - Property - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - [set: System.Security.SecuritySafeCritical] - [<set: System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - Gets or sets a value indicating whether the key should be persisted in the cryptographic service provider (CSP). - - if the key should be persisted in the CSP; otherwise, . - - - - Cryptographic Services - - - - - - - - - - Property - - mscorlib - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.InteropServices.ComVisible(false)] - [<System.Runtime.InteropServices.ComVisible(false)>] - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - Gets a value that indicates whether the object contains only a public key. - - if the object contains only a public key; otherwise, . - - class can be initialized either with a public key only or with both a public and private key. Use the property to determine whether the current instance contains only a public key or both a public and private key. - - ]]> - - Cryptographic Services - - - - - - - - - - Property - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.String - - - Gets the name of the signature algorithm. - The name of the signature algorithm. - To be added. - Cryptographic Services - - - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - Computes the hash value of the specified data and signs it. - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - The input data for which to compute the hash. - Computes the hash value of the specified byte array and signs the resulting hash value. - The signature for the specified data. - - method. - - uses the hash algorithm. - - ]]> - - Cryptographic Services - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - The input data for which to compute the hash. - Computes the hash value of the specified input stream and signs the resulting hash value. - The signature for the specified data. - - uses the hash algorithm. - - ]]> - - Cryptographic Services - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - - The input data to sign. - The offset into the array from which to begin using data. - The number of bytes in the array to use as data. - Signs a byte array from the specified start point to the specified end point. - The signature for the specified data. - - method. - - uses the hash algorithm. - - ]]> - - Cryptographic Services - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - The hash value of the data to be signed. - The name of the hash algorithm used to create the hash value of the data. - Computes the signature for the specified hash value by encrypting it with the private key. - The signature for the specified hash value. - - method. - - uses the hash algorithm. - - ]]> - - The parameter is . - The cryptographic service provider (CSP) cannot be acquired. - - -or- - - There is no private key. - Cryptographic Services - - - - - - - - - - Property - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - Gets or sets a value indicating whether the key should be persisted in the computer's key store instead of the user profile store. - - if the key should be persisted in the computer key store; otherwise, . - - flag to a object. The property applies to all code in the current application domain, while the object applies only to classes that explicitly reference it. These settings are useful when impersonating or running under an account whose user profile is not loaded. - - ]]> - - Cryptographic Services - - - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - Verifies that a digital signature is valid. - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - The data that was signed. - The signature data to be verified. - Verifies the specified signature data by comparing it to the signature computed for the specified data. - - if the signature verifies as valid; otherwise, . - - digital signature produced by . - - uses the hash algorithm. - - ]]> - - Cryptographic Services - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - - The hash value of the data to be signed. - The name of the hash algorithm used to create the hash value of the data. - The signature data to be verified. - Verifies the specified signature data by comparing it to the signature computed for the specified hash value. - - if the signature verifies as valid; otherwise, . - - digital signature produced by . - - If the `str` parameter is `null`, the default hash algorithm (SHA1) is used. The valid hash algorithms is . - - Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better. - - ]]> - - The parameter is . - - -or- - - The parameter is . - The cryptographic service provider (CSP) cannot be acquired. - - -or- - - The signature cannot be verified. - Cryptographic Services - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - The data signed with . - The signature to be verified for . - Verifies the signature for the specified data. - - if matches the signature computed using the specified hash algorithm and key on ; otherwise, . - To be added. - Cryptographic Services - - - - + + + + + + + + + + + + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.Security.Cryptography.DSA + + + + System.Security.Cryptography.ICspAsymmetricAlgorithm + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Runtime.InteropServices.ComVisible(true)] + [<System.Runtime.InteropServices.ComVisible(true)>] + + + + Defines a wrapper object to access the cryptographic service provider (CSP) implementation of the algorithm. This class cannot be inherited. + + class to create digital signatures and protect the integrity of your data. + + To use a public-key system to digitally sign a message, the sender first applies a hash function to the message to create a message digest. The sender then encrypts the message digest with the sender's private key to create the sender's personal signature. Upon receiving the message and signature, the receiver decrypts the signature using the sender's public key to recover the message digest and hashes the message using the same hash algorithm that the sender used. If the message digest that the receiver computes exactly matches the message digest received from the sender, the receiver can be sure that the message was not altered while in transit. Note that a signature can be verified by anyone, because the sender's public key is common knowledge. + +> [!NOTE] +> The creators of the DSA algorithm have withdrawn their support for it. Consider using the class instead of the class. Use only for compatibility with legacy applications and data. + + This algorithm supports key lengths from 512 bits to 1024 bits in increments of 64 bits. + + ]]> + + Cryptographic Services + + + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + Initializes a new instance of the class. + + + + + + + + + Constructor + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] + + + + + Initializes a new instance of the class. + To be added. + Cryptographic Services + + + + + + + + + + Constructor + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] + + + + + + + The size of the key for the asymmetric algorithm in bits. + Initializes a new instance of the class with the specified key size. + To be added. + Cryptographic Services + + + + + + + + + + + Constructor + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + + + + The parameters for the CSP. + Initializes a new instance of the class with the specified parameters for the cryptographic service provider (CSP). + To be added. + Cryptographic Services + + + + + + + + + + + Constructor + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + + + + + The size of the key for the cryptographic algorithm in bits. + The parameters for the CSP. + Initializes a new instance of the class with the specified key size and parameters for the cryptographic service provider (CSP). + To be added. + The CSP cannot be acquired. + + -or- + + The key cannot be created. + + is out of range. + Cryptographic Services + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + The data to be signed. + Creates the signature for the specified data. + The digital signature for the specified data. + To be added. + Cryptographic Services + + + + + + + + + + Property + + P:System.Security.Cryptography.ICspAsymmetricAlgorithm.CspKeyContainerInfo + + + mscorlib + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Runtime.InteropServices.ComVisible(false)] + [<System.Runtime.InteropServices.ComVisible(false)>] + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.CspKeyContainerInfo + + + Gets a object that describes additional information about a cryptographic key pair. + A object that describes additional information about a cryptographic key pair. + + property to retrieve additional information about a cryptographic key pair. The returned object describes whether the key is exportable, and specifies the key container name, information about the provider, and other information. + + In cases where a random key is generated, a key container will not be created until you call a method that uses the key. Some properties of the object returned by the property will throw a if a key container has not been created. To make sure that a key container has been created, call a method such as , , , , and so on, before you call the property. + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Void + + + + + + + to release managed and unmanaged resources; to release only unmanaged resources. + Releases the resources used by the current instance of the class. + To be added. + + + + + + + + + + Method + + M:System.Security.Cryptography.ICspAsymmetricAlgorithm.ExportCspBlob(System.Boolean) + + + mscorlib + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.InteropServices.ComVisible(false)] + [<System.Runtime.InteropServices.ComVisible(false)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + to include the private key; otherwise, . + Exports a blob containing the key information associated with a object. + A byte array containing the key information associated with a object. + + method returns a blob containing key information that is compatible with the unmanaged Microsoft Cryptographic API (CAPI). + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.DSAParameters + + + + + + + to include private parameters; otherwise, . + Exports the . + The parameters for . + To be added. + The key cannot be exported. + Cryptographic Services + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.5.0 + 4.0.0.0 + + + System.Security.Cryptography.Csp + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + Frees all resources associated with this instance. + To be added. + + + + + + + + + + Method + + mscorlib + 4.0.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + The binary stream to hash. + The algorithm to use to hash the data. + Computes the hash value of a specified binary stream by using a specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + mscorlib + 4.0.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + + The data to be hashed. + The index of the first byte in to be hashed. + The number of bytes to hash. + The algorithm to use to hash the data. + When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + M:System.Security.Cryptography.ICspAsymmetricAlgorithm.ImportCspBlob(System.Byte[]) + + + mscorlib + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.InteropServices.ComVisible(false)] + [<System.Runtime.InteropServices.ComVisible(false)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Void + + + + + + A byte array that represents a DSA key blob. + Imports a blob that represents DSA key information. + + method initializes the key data of a object using a blob that is compatible with the unmanaged Microsoft Cryptographic API (CAPI). + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Csp + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The bytes to use as a password when decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Csp + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The password to use for decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Void + + + + + + The parameters for . + Imports the specified . + To be added. + The cryptographic service provider (CSP) cannot be acquired. + + -or- + + The parameter has missing fields. + Cryptographic Services + + + + + + + + + + + Property + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.String + + + Gets the name of the key exchange algorithm. + The name of the key exchange algorithm. + To be added. + Cryptographic Services + + + + + + + + + + Property + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + + System.Int32 + + + Gets the size of the key used by the asymmetric algorithm in bits. + The size of the key used by the asymmetric algorithm. + + class does not allow you to change key sizes using the property. Any value written to this property will fail to update the property without error. To change the key size, use one of the constructor overloads. + + ]]> + + Cryptographic Services + + + + + + + + + + Property + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.KeySizes[] + + + Gets the key sizes that are supported by the asymmetric algorithm. + Only key sizes that match an entry in this array are supported by the asymmetric algorithm. + + . + +This algorithm supports key lengths from 512 bits to 1024 bits in increments of 64 bits. + +]]> + + Cryptographic Services + + + + + + + + + + Property + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + [set: System.Security.SecuritySafeCritical] + [<set: System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + Gets or sets a value indicating whether the key should be persisted in the cryptographic service provider (CSP). + + if the key should be persisted in the CSP; otherwise, . + + + + Cryptographic Services + + + + + + + + + + Property + + mscorlib + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.InteropServices.ComVisible(false)] + [<System.Runtime.InteropServices.ComVisible(false)>] + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + Gets a value that indicates whether the object contains only a public key. + + if the object contains only a public key; otherwise, . + + class can be initialized either with a public key only or with both a public and private key. Use the property to determine whether the current instance contains only a public key or both a public and private key. + + ]]> + + Cryptographic Services + + + + + + + + + + Property + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.String + + + Gets the name of the signature algorithm. + The name of the signature algorithm. + To be added. + Cryptographic Services + + + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + Computes the hash value of the specified data and signs it. + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + The input data for which to compute the hash. + Computes the hash value of the specified byte array and signs the resulting hash value. + The signature for the specified data. + + method. + + uses the hash algorithm. + + ]]> + + Cryptographic Services + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + The input data for which to compute the hash. + Computes the hash value of the specified input stream and signs the resulting hash value. + The signature for the specified data. + + uses the hash algorithm. + + ]]> + + Cryptographic Services + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + + The input data to sign. + The offset into the array from which to begin using data. + The number of bytes in the array to use as data. + Signs a byte array from the specified start point to the specified end point. + The signature for the specified data. + + method. + + uses the hash algorithm. + + ]]> + + Cryptographic Services + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + The hash value of the data to be signed. + The name of the hash algorithm used to create the hash value of the data. + Computes the signature for the specified hash value by encrypting it with the private key. + The signature for the specified hash value. + + method. + + uses the hash algorithm. + + ]]> + + The parameter is . + The cryptographic service provider (CSP) cannot be acquired. + + -or- + + There is no private key. + Cryptographic Services + + + + + + + + + + Property + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + Gets or sets a value indicating whether the key should be persisted in the computer's key store instead of the user profile store. + + if the key should be persisted in the computer key store; otherwise, . + + flag to a object. The property applies to all code in the current application domain, while the object applies only to classes that explicitly reference it. These settings are useful when impersonating or running under an account whose user profile is not loaded. + + ]]> + + Cryptographic Services + + + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + Verifies that a digital signature is valid. + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + The data that was signed. + The signature data to be verified. + Verifies the specified signature data by comparing it to the signature computed for the specified data. + + if the signature verifies as valid; otherwise, . + + digital signature produced by . + + uses the hash algorithm. + + ]]> + + Cryptographic Services + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + + The hash value of the data to be signed. + The name of the hash algorithm used to create the hash value of the data. + The signature data to be verified. + Verifies the specified signature data by comparing it to the signature computed for the specified hash value. + + if the signature verifies as valid; otherwise, . + + digital signature produced by . + + If the `str` parameter is `null`, the default hash algorithm (SHA1) is used. The valid hash algorithms is . + + Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better. + + ]]> + + The parameter is . + + -or- + + The parameter is . + The cryptographic service provider (CSP) cannot be acquired. + + -or- + + The signature cannot be verified. + Cryptographic Services + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + The data signed with . + The signature to be verified for . + Verifies the signature for the specified data. + + if matches the signature computed using the specified hash algorithm and key on ; otherwise, . + To be added. + Cryptographic Services + + + + diff --git a/xml/System.Security.Cryptography/ECDiffieHellman.xml b/xml/System.Security.Cryptography/ECDiffieHellman.xml index 5ddf688ce44..e6c91b72007 100644 --- a/xml/System.Security.Cryptography/ECDiffieHellman.xml +++ b/xml/System.Security.Cryptography/ECDiffieHellman.xml @@ -1,2031 +1,2038 @@ - - - - - - - - - - - - - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.Security.Cryptography.AsymmetricAlgorithm - System.Security.Cryptography.ECAlgorithm - - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - Provides an abstract base class that Elliptic Curve Diffie-Hellman (ECDH) algorithm implementations can derive from. This class provides the basic set of operations that all ECDH implementations must support. - - - - - - - - - - - - Constructor - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - - Initializes a new instance of the class. - - class. The class is the only implementation that is currently included in the .NET Framework. For information about how to create a new implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm, see the method. - - ]]> - - - - - - System.Core - 4.0.0.0 - - - Creates a new instance of an implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - - System.Security.Cryptography.ECDiffieHellman - - - - Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. - A new instance of the default implementation of this class. - To be added. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - - System.Security.Cryptography.ECDiffieHellman - - - - - - The curve to use to generate a new public/private key-pair. - Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm with a new public/private key-pair generated over the specified curve. - A new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. - - method. - - Characteristic-2 curves are not supported on Windows. - - ]]> - - - does not validate. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - - System.Security.Cryptography.ECDiffieHellman - - - - - - The parameters for the elliptic curve cryptography (ECC) algorithm. - Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm with the key described by the specified object. - A new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. - - method. Parameters over implicit curves are not supported. - - Characteristic-2 curves are not supported on Windows. - - ]]> - - - does not validate. - - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] - [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>] - - - [System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - System.Security.Cryptography.ECDiffieHellman - - - - - - The name of an implementation of the ECDH algorithm. - Creates a new instance of the specified implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. - A new instance of the specified implementation of this class. If the specified algorithm name does not map to an ECDH implementation, this method returns . - - object, you can use the method overload to create a custom `algorithm` string that specifies your implementation. - - The `algorithm` parameter specifies the name of an implementation of the ECDH algorithm. The following strings all refer to the same implementation, which is the only implementation currently supported in the .NET Framework: - -- "ECDH" - -- "ECDiffieHellman" - -- "ECDiffieHellmanCng" - -- "System.Security.Cryptography.ECDiffieHellmanCng" - - You can also provide the name of a custom ECDH implementation for the `algorithm` parameter. If you do that, the object will use it to determine whether an ECDH object can be created. - - ]]> - - The parameter is . - - - - - System.Core - 4.0.0.0 - - - Performs key derivation using a specified hash algorithm. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - The other party's public key. - The hash algorithm to use to derive the key material. - Performs key derivation using a specified hash algorithm. - The hash of the shared secret. - - method passing `null` as the prepend and append values. - - ]]> - - The curve used by has a different size than the curve from this key. - --or- - -The parameter does not specify a hash. - - - is . - The curve used by is different than the curve from this key. - --or- - -This instance represents only a public key. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - The other party's public key. - The hash algorithm to use to derive the key material. - A value to prepend to the derived secret before hashing. - A value to append to the derived secret before hashing. - When implemented in a derived class, performs key derivation using a specified hash algorithm with optional prepended or appended data. - The hash of the shared secret after prepending or appending data as requested. - - - - A derived class must override this method. - The curve used by has a different size than the curve from this key. - --or- - -The parameter does not specify a hash. - - - is . - The curve used by is different than the curve from this key. - --or- - -This instance represents only a public key. - - - - - System.Core - 4.0.0.0 - - - Performs key derivation using a specified HMAC (Hash-based Message Authentication Code) algorithm. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - The other party's public key. - The hash algorithm to use to derive the key material. - The key for the HMAC. - Performs key derivation using a specified HMAC (Hash-based Message Authentication Code) algorithm. - The HMAC of the shared secret. - - method passing `null` as the prepend and append values. - - ]]> - - The curve used by has a different size than the curve from this key. - --or- - -The parameter does not specify a hash. - - - is . - The curve used by is different than the curve from this key. - --or- - -This instance represents only a public key. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - - The other party's public key. - The hash algorithm to use to derive the key material. - The key for the HMAC. - A value to prepend to the derived secret before hashing. - A value to append to the derived secret before hashing. - When implemented in a derived class, performs key derivation using a specified HMAC (Hash-based Message Authentication Code) algorithm with optional prepended or appended data. - The HMAC of the shared secret after prepending or appending data as requested. - - - - A derived class must override this method. - The curve used by has a different size than the curve from this key. - --or- - -The parameter does not specify a hash. - - - is . - The curve used by is different than the curve from this key. - --or- - -This instance represents only a public key. - - - - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - The other party's public key. - When implemented in a derived class, performs a key derivation on the shared secret. - The result of the key derivation function, using the shared secret as an input. - - specifying SHA-256 as the hash algorithm with no prepend or append values. -Some implementations allow the behavior of this method to be changed, -and callers are advised to call whichever method explicitly says it performs the key derivation they need. - - ]]> - - The curve used by has a different size than the curve from this key. - - is . - The curve used by is different than the curve from this key. - --or- - -This instance represents only a public key. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - The other party's public key. - The ASCII-encoded PRF label. - The 64-byte PRF seed. - When implemented in a derived class, performs key derivation using the TLS (Transport Layer Security) 1.1 PRF (Pseudo-Random Function). - The first 48 bytes from the TLS 1.1 PRF, using the shared secret as the key. - - - - A derived class must override this method. - The curve used by has a different size than the curve from this key. - - , or is . - - is not exactly 64 bytes in length. - --or- - -The curve used by is different than the curve from this key. - --or- - -This instance represents only a public key. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - - - System.Byte[] - - - - Exports the current key in the ECPrivateKey format. - A byte array containing the ECPrivateKey representation of this key. - To be added. - The key could not be exported. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - - - System.Security.Cryptography.ECParameters - - - - - - - to include private parameters; otherwise, . - When overridden in a derived class, exports either the public or the public and private key information using the explicit curve form from a working key to an structure so that it can be passed to the method. - An object that represents the point on the curve for this key, using the explicit curve format. - To be added. - A derived class must override this method. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - - - System.Security.Cryptography.ECParameters - - - - - - - to include private parameters; otherwise, to include public parameters only. - When overridden in a derived class, exports either the public or the public and private key information from a working key to an structure so that it can be passed to the method. - An object that represents the point on the curve for this key. It can be passed to the method. - - property contains named curve parameters; otherwise, it will contain explicit parameters. - - ]]> - - A derived class must override this method. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The XML string to use to reconstruct the object. - This method throws in all cases. - To be added. - In all cases. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - - - System.Void - - - - - - The curve used to generate an ephemeral public/private key pair. - When overridden in a derived class, generates a new ephemeral public/private key pair for the specified curve. - - method) and must not be implicit. - - Characteristic-2 curves are not supported on Windows. - - ]]> - - - does not validate. - A derived class must override this method. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - - - System.Void - - - - - - - The bytes of an ECPrivateKey structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public/private keypair from an ECPrivateKey structure, replacing the keys for this object. - - - - The contents of do not represent an ASN.1-BER-encoded PKCS#8 ECPrivateKey structure. - --or- - -The key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - - - - - The bytes to use as a password when decrypting the key material. - The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. - - - - The password is incorrect. - --or- - -The contents of indicate the Key Derivation Function (KDF) to apply is the legacy PKCS#12 KDF, which requires -based passwords. - --or- - -The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - - - - - The password to use for decrypting the key material. - The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. - - - - The password is incorrect. - --or- - -The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - - - - The PEM text of the encrypted key to import. - The bytes to use as a password when decrypting the key material. - Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object. - - - - - does not contain a PEM-encoded key with a recognized label. - --or- - - contains multiple PEM-encoded keys with a recognized label. - - -The password is incorrect. - --or- - -The base-64 decoded contents of the PEM text from do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The base-64 decoded contents of the PEM text from indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The base-64 decoded contents of the PEM text from represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - - - - The PEM text of the encrypted key to import. - The password to use for decrypting the key material. - Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object. - - - - - does not contain a PEM-encoded key with a recognized label. - --or- - - contains multiple PEM-encoded keys with a recognized label. - - -The password is incorrect. - --or- - -The base-64 decoded contents of the PEM text from do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The base-64 decoded contents of the PEM text from indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The base-64 decoded contents of the PEM text from represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - - - The PEM text of the key to import. - Imports an RFC 7468 PEM-encoded key, replacing the keys for this object. - - - - - does not contain a PEM-encoded key with a recognized label. - --or- - - contains multiple PEM-encoded keys with a recognized label. - --or- - - contains an encrypted PEM-encoded key. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - - - System.Void - - - - - - The curve's parameters to import. - When overridden in a derived class, imports the specified parameters for an as an ephemeral key into the current object. - - method. Parameters over implicit curves are not supported. - - Characteristic-2 curves are not supported on Windows. - - ]]> - - - does not validate. - A derived class must override this method. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - - - - The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object. - - - - The contents of do not represent an ASN.1-BER-encoded PKCS#8 PrivateKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - - - - The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object. - - - - The contents of do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.String - - - Gets the name of the key exchange algorithm. - The name of the key exchange algorithm. - - base class. - - ]]> - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.ECDiffieHellmanPublicKey - - - Gets the public key that is being used by the current Elliptic Curve Diffie-Hellman (ECDH) instance. - The public part of the ECDH key pair that is being used by this instance. - To be added. - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.String - - - Gets the name of the signature algorithm. - Always . - - base class. - - The Elliptic Curve Diffie-Hellman (ECDH) algorithm is used for key derivation, not digital signature generation. Therefore, this property returns `null`. - - ]]> - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.String - - - - - - - to include private parameters; otherwise, . - This method throws in all cases. - This method does not return a value. - To be added. - In all cases. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - - - System.Boolean - - - - - - - The byte span to receive the data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the format into a provided buffer. - - if is big enough to receive the output; otherwise, . - To be added. - The key could not be exported. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Boolean - - - - - - - - - The bytes to use as a password when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password. - - if is big enough to receive the output; otherwise, . - - - - The key could not be exported. - --or- - - indicates that should be used, which requires -based passwords. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Boolean - - - - - - - - - The password to use when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password. - - if is big enough to receive the output; otherwise, . - - - - The key could not be exported. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Boolean - - - - - - - The byte span to receive the PKCS#8 PrivateKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. - - if is big enough to receive the output; otherwise, . - To be added. - The key could not be exported. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - - - System.Security.Cryptography - - - System.Boolean - - - - - - - The byte span to receive the X.509 SubjectPublicKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer. - - if is big enough to receive the output; otherwise, . - To be added. - The key could not be exported. - - - - - + + + + + + + + + + + + + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.Security.Cryptography.AsymmetricAlgorithm + System.Security.Cryptography.ECAlgorithm + + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Provides an abstract base class that Elliptic Curve Diffie-Hellman (ECDH) algorithm implementations can derive from. This class provides the basic set of operations that all ECDH implementations must support. + + + + + + + + + + + + Constructor + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + + Initializes a new instance of the class. + + class. The class is the only implementation that is currently included in the .NET Framework. For information about how to create a new implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm, see the method. + + ]]> + + + + + + System.Core + 4.0.0.0 + + + Creates a new instance of an implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + + System.Security.Cryptography.ECDiffieHellman + + + + Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. + A new instance of the default implementation of this class. + To be added. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + + System.Security.Cryptography.ECDiffieHellman + + + + + + The curve to use to generate a new public/private key-pair. + Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm with a new public/private key-pair generated over the specified curve. + A new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. + + method. + + Characteristic-2 curves are not supported on Windows. + + ]]> + + + does not validate. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + + System.Security.Cryptography.ECDiffieHellman + + + + + + The parameters for the elliptic curve cryptography (ECC) algorithm. + Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm with the key described by the specified object. + A new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. + + method. Parameters over implicit curves are not supported. + + Characteristic-2 curves are not supported on Windows. + + ]]> + + + does not validate. + + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] + [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>] + + + [System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + System.Security.Cryptography.ECDiffieHellman + + + + + + The name of an implementation of the ECDH algorithm. + Creates a new instance of the specified implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. + A new instance of the specified implementation of this class. If the specified algorithm name does not map to an ECDH implementation, this method returns . + + object, you can use the method overload to create a custom `algorithm` string that specifies your implementation. + + The `algorithm` parameter specifies the name of an implementation of the ECDH algorithm. The following strings all refer to the same implementation, which is the only implementation currently supported in the .NET Framework: + +- "ECDH" + +- "ECDiffieHellman" + +- "ECDiffieHellmanCng" + +- "System.Security.Cryptography.ECDiffieHellmanCng" + + You can also provide the name of a custom ECDH implementation for the `algorithm` parameter. If you do that, the object will use it to determine whether an ECDH object can be created. + + ]]> + + The parameter is . + + + + + System.Core + 4.0.0.0 + + + Performs key derivation using a specified hash algorithm. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + The other party's public key. + The hash algorithm to use to derive the key material. + Performs key derivation using a specified hash algorithm. + The hash of the shared secret. + + method passing `null` as the prepend and append values. + + ]]> + + The curve used by has a different size than the curve from this key. + +-or- + +The parameter does not specify a hash. + + + is . + The curve used by is different than the curve from this key. + +-or- + +This instance represents only a public key. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + The other party's public key. + The hash algorithm to use to derive the key material. + A value to prepend to the derived secret before hashing. + A value to append to the derived secret before hashing. + When implemented in a derived class, performs key derivation using a specified hash algorithm with optional prepended or appended data. + The hash of the shared secret after prepending or appending data as requested. + + + + A derived class must override this method. + The curve used by has a different size than the curve from this key. + +-or- + +The parameter does not specify a hash. + + + is . + The curve used by is different than the curve from this key. + +-or- + +This instance represents only a public key. + + + + + System.Core + 4.0.0.0 + + + Performs key derivation using a specified HMAC (Hash-based Message Authentication Code) algorithm. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + The other party's public key. + The hash algorithm to use to derive the key material. + The key for the HMAC. + Performs key derivation using a specified HMAC (Hash-based Message Authentication Code) algorithm. + The HMAC of the shared secret. + + method passing `null` as the prepend and append values. + + ]]> + + The curve used by has a different size than the curve from this key. + +-or- + +The parameter does not specify a hash. + + + is . + The curve used by is different than the curve from this key. + +-or- + +This instance represents only a public key. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + + The other party's public key. + The hash algorithm to use to derive the key material. + The key for the HMAC. + A value to prepend to the derived secret before hashing. + A value to append to the derived secret before hashing. + When implemented in a derived class, performs key derivation using a specified HMAC (Hash-based Message Authentication Code) algorithm with optional prepended or appended data. + The HMAC of the shared secret after prepending or appending data as requested. + + + + A derived class must override this method. + The curve used by has a different size than the curve from this key. + +-or- + +The parameter does not specify a hash. + + + is . + The curve used by is different than the curve from this key. + +-or- + +This instance represents only a public key. + + + + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + The other party's public key. + When implemented in a derived class, performs a key derivation on the shared secret. + The result of the key derivation function, using the shared secret as an input. + + specifying SHA-256 as the hash algorithm with no prepend or append values. +Some implementations allow the behavior of this method to be changed, +and callers are advised to call whichever method explicitly says it performs the key derivation they need. + + ]]> + + The curve used by has a different size than the curve from this key. + + is . + The curve used by is different than the curve from this key. + +-or- + +This instance represents only a public key. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + The other party's public key. + The ASCII-encoded PRF label. + The 64-byte PRF seed. + When implemented in a derived class, performs key derivation using the TLS (Transport Layer Security) 1.1 PRF (Pseudo-Random Function). + The first 48 bytes from the TLS 1.1 PRF, using the shared secret as the key. + + + + A derived class must override this method. + The curve used by has a different size than the curve from this key. + + , or is . + + is not exactly 64 bytes in length. + +-or- + +The curve used by is different than the curve from this key. + +-or- + +This instance represents only a public key. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Byte[] + + + + + + The public key of the party with which to derive a mutual secret. + Derive raw key material. + The raw key agreement. + Care must be taking when using the raw derived secret agreement value. The raw value is expected to be used as input in to a Key Derivation Function, and not used directly as key material. + + is . + + is over a different curve than this key. + A derived implementation has not provided an implementation of the method. + The current platform does not support raw key agreement. + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + + + System.Byte[] + + + + Exports the current key in the ECPrivateKey format. + A byte array containing the ECPrivateKey representation of this key. + To be added. + The key could not be exported. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + + + System.Security.Cryptography.ECParameters + + + + + + + to include private parameters; otherwise, . + When overridden in a derived class, exports either the public or the public and private key information using the explicit curve form from a working key to an structure so that it can be passed to the method. + An object that represents the point on the curve for this key, using the explicit curve format. + To be added. + A derived class must override this method. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + + + System.Security.Cryptography.ECParameters + + + + + + + to include private parameters; otherwise, to include public parameters only. + When overridden in a derived class, exports either the public or the public and private key information from a working key to an structure so that it can be passed to the method. + An object that represents the point on the curve for this key. It can be passed to the method. + + property contains named curve parameters; otherwise, it will contain explicit parameters. + + ]]> + + A derived class must override this method. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The XML string to use to reconstruct the object. + This method throws in all cases. + To be added. + In all cases. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + + + System.Void + + + + + + The curve used to generate an ephemeral public/private key pair. + When overridden in a derived class, generates a new ephemeral public/private key pair for the specified curve. + + method) and must not be implicit. + + Characteristic-2 curves are not supported on Windows. + + ]]> + + + does not validate. + A derived class must override this method. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + + + System.Void + + + + + + + The bytes of an ECPrivateKey structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public/private keypair from an ECPrivateKey structure, replacing the keys for this object. + + + + The contents of do not represent an ASN.1-BER-encoded PKCS#8 ECPrivateKey structure. + +-or- + +The key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + + + + + The bytes to use as a password when decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. + + + + The password is incorrect. + +-or- + +The contents of indicate the Key Derivation Function (KDF) to apply is the legacy PKCS#12 KDF, which requires -based passwords. + +-or- + +The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + + + + + The password to use for decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. + + + + The password is incorrect. + +-or- + +The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + + + + The PEM text of the encrypted key to import. + The bytes to use as a password when decrypting the key material. + Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object. + + + + + does not contain a PEM-encoded key with a recognized label. + +-or- + + contains multiple PEM-encoded keys with a recognized label. + + +The password is incorrect. + +-or- + +The base-64 decoded contents of the PEM text from do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The base-64 decoded contents of the PEM text from indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The base-64 decoded contents of the PEM text from represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + + + + The PEM text of the encrypted key to import. + The password to use for decrypting the key material. + Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object. + + + + + does not contain a PEM-encoded key with a recognized label. + +-or- + + contains multiple PEM-encoded keys with a recognized label. + + +The password is incorrect. + +-or- + +The base-64 decoded contents of the PEM text from do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The base-64 decoded contents of the PEM text from indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The base-64 decoded contents of the PEM text from represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + + + The PEM text of the key to import. + Imports an RFC 7468 PEM-encoded key, replacing the keys for this object. + + + + + does not contain a PEM-encoded key with a recognized label. + +-or- + + contains multiple PEM-encoded keys with a recognized label. + +-or- + + contains an encrypted PEM-encoded key. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + + + System.Void + + + + + + The curve's parameters to import. + When overridden in a derived class, imports the specified parameters for an as an ephemeral key into the current object. + + method. Parameters over implicit curves are not supported. + + Characteristic-2 curves are not supported on Windows. + + ]]> + + + does not validate. + A derived class must override this method. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + + + + The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object. + + + + The contents of do not represent an ASN.1-BER-encoded PKCS#8 PrivateKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + + + + The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object. + + + + The contents of do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.String + + + Gets the name of the key exchange algorithm. + The name of the key exchange algorithm. + + base class. + + ]]> + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.ECDiffieHellmanPublicKey + + + Gets the public key that is being used by the current Elliptic Curve Diffie-Hellman (ECDH) instance. + The public part of the ECDH key pair that is being used by this instance. + To be added. + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.String + + + Gets the name of the signature algorithm. + Always . + + base class. + + The Elliptic Curve Diffie-Hellman (ECDH) algorithm is used for key derivation, not digital signature generation. Therefore, this property returns `null`. + + ]]> + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.String + + + + + + + to include private parameters; otherwise, . + This method throws in all cases. + This method does not return a value. + To be added. + In all cases. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + + + System.Boolean + + + + + + + The byte span to receive the data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the format into a provided buffer. + + if is big enough to receive the output; otherwise, . + To be added. + The key could not be exported. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Boolean + + + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password. + + if is big enough to receive the output; otherwise, . + + + + The key could not be exported. + +-or- + + indicates that should be used, which requires -based passwords. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Boolean + + + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password. + + if is big enough to receive the output; otherwise, . + + + + The key could not be exported. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Boolean + + + + + + + The byte span to receive the PKCS#8 PrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. + + if is big enough to receive the output; otherwise, . + To be added. + The key could not be exported. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + + + System.Security.Cryptography + + + System.Boolean + + + + + + + The byte span to receive the X.509 SubjectPublicKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer. + + if is big enough to receive the output; otherwise, . + To be added. + The key could not be exported. + + + + + diff --git a/xml/System.Security.Cryptography/ECDiffieHellmanCng.xml b/xml/System.Security.Cryptography/ECDiffieHellmanCng.xml index 5837202df20..25588d5b728 100644 --- a/xml/System.Security.Cryptography/ECDiffieHellmanCng.xml +++ b/xml/System.Security.Cryptography/ECDiffieHellmanCng.xml @@ -1,2166 +1,2169 @@ - - - - - - - - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - System.Security.Cryptography.ECDiffieHellman - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - Provides a Cryptography Next Generation (CNG) implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. This class is used to perform cryptographic operations. - - class enables two parties to exchange private key material even if they are communicating through a public channel. Both parties can calculate the same secret value, which is referred to as the *secret agreement* in the managed Diffie-Hellman classes. The secret agreement can then be used for a variety of purposes, including as a symmetric key. However, instead of exposing the secret agreement directly, the class does some post-processing on the agreement before providing the value. This post processing is referred to as the *key derivation function (KDF)*; you can select which KDF you want to use and set its parameters through a set of properties on the instance of the Diffie-Hellman object. - -|Key derivation function|Properties| -|-----------------------------|----------------| -|| - The hash algorithm that is used to process the secret agreement.

- An optional byte array to prepend to the secret agreement before hashing it.

- An optional byte array to append to the secret agreement before hashing it.| -|| - The hash algorithm that is used to process the secret agreement.

- An optional byte array to prepend to the secret agreement before hashing it.

- An optional byte array to append to the secret agreement before hashing it.| -|| - The label for key derivation.

- The seed for key derivation.| - - The result of passing the secret agreement through the key derivation function is a byte array that may be used as key material for your application. The number of bytes of key material generated is dependent on the key derivation function; for example, SHA-256 will generate 256 bits of key material, whereas SHA-512 will generate 512 bits of key material. The basic flow of an ECDH key exchange is as follows: - -1. Alice and Bob create a key pair to use for the Diffie-Hellman key exchange operation - -2. Alice and Bob configure the KDF using parameters the agree on. - -3. Alice sends Bob her public key. - -4. Bob sends Alice his public key. - -5. Alice and Bob use each other's public keys to generate the secret agreement, and apply the KDF to the secret agreement to generate key material. - - - -## Examples - The following example shows how to use the class to establish a key exchange and how to use that key to encrypt a message that can be sent over a public channel and decrypted by the receiver. - - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/ECDiffieHellmanCng/Overview/program.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ecdiffiehellmancng/vb/program.vb" id="Snippet1"::: - - ]]>
-
-
- - - - System.Core - 4.0.0.0 - - - Initializes a new instance of the class. - - - - - - - - - Constructor - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - - Initializes a new instance of the class with a random key pair. - - - - - - - - - - - - - Constructor - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - - - - - The size of the key. Valid key sizes are 256, 384, and 521 bits. - Initializes a new instance of the class with a random key pair, using the specified key size. - - - - - specifies an invalid length. - Cryptography Next Generation (CNG) classes are not supported on this system. - - - - - - - - - - Constructor - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - - - - The key that will be used as input to the cryptographic operations performed by the current object. - Initializes a new instance of the class by using the specified object. - To be added. - - is . - - does not specify an Elliptic Curve Diffie-Hellman (ECDH) algorithm group. - Cryptography Next Generation (CNG) classes are not supported on this system. - - - - - - - - - - Constructor - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - - - - - The curve used to generate the public/private key pair. - Creates a new instance of the class whose public/private key pair is generated over the specified curve. - - method and must be either a named or explicit prime. - - ]]> - - - does not validate. - - - - - System.Core - 4.0.0.0 - - - Performs key derivation using a specified hash algorithm. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - The other party's public key. - The hash algorithm to use to derive the key material. - A value to prepend to the derived secret before hashing. - A value to append to the derived secret before hashing. - Performs key derivation using a specified hash algorithm with optional prepended or appended data. - The hash of the shared secret after prepending or appending data as requested. - To be added. - A derived class must override this method. - The curve used by has a different size than the curve from this key. - --or- - -The parameter does not specify a hash. - - - is . - The curve used by is different than the curve from this key. - --or- - -This instance represents only a public key. - - - - - System.Core - 4.0.0.0 - - - Derives bytes that can be used as a key using a Hash-based Message Authentication Code (HMAC). - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - - The other party's public key. - The hash algorithm to use to derive the key material. - The key for the HMAC. - A value to prepend to the derived secret before hashing. - A value to append to the derived secret before hashing. - Performs key derivation using a specified HMAC (Hash-based Message Authentication Code) algorithm with optional prepended or appended data. - The HMAC of the shared secret after prepending or appending data as requested. - To be added. - The curve used by has a different size than the curve from this key. - --or- - -The parameter does not specify a hash. - - is . - The curve used by is different than the curve from this key. - --or- - -This instance represents only a public key. - - - - - System.Core - 4.0.0.0 - - - Derives the key material that is generated from the secret agreement between two parties. - - - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - An object that contains the public part of the Elliptic Curve Diffie-Hellman (ECDH) key from the other party in the key exchange. - Derives the key material that is generated from the secret agreement between two parties, given a object that contains the second party's public key. - A byte array that contains the key material. This information is generated from the secret agreement that is calculated from the current object's private key and the specified public key. - To be added. - - is . - - is invalid. Either its property does not specify or its key size does not match the key size of this instance. - This object's property specifies the key derivation function, but either or is . - All other errors. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - The public key from the other party in the key exchange. - Derives the key material that is generated from the secret agreement between two parties, given an object that contains the second party's public key. - A byte array that contains the key material. This information is generated from the secret agreement that is calculated from the current object's private key and the specified public key. - To be added. - - is . - - is not an key. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - - The other party's public key. - The ASCII-encoded PRF label. - The 64-byte PRF seed. - Performs key derivation using the TLS (Transport Layer Security) 1.1 PRF (Pseudo-Random Function). - The first 48 bytes from the TLS 1.1 PRF, using the shared secret as the key. - To be added. - A derived class must override this method. - The curve used by has a different size than the curve from this key. - - , or is . - - is not exactly 64 bytes in length. - --or- - -The curve used by is different than the curve from this key. - --or- - -This instance represents only a public key. - - - - - System.Core - 4.0.0.0 - - - Gets a handle to the secret agreement generated between two parties. - - method overloads are for advanced users who need a handle to the raw secret agreement instead of the key material. The secret agreement handle can be used in platform invoke calls to perform any work that is not wrapped by the class. - - ]]> - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - - Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle - - - - - - An object that contains the public part of the Elliptic Curve Diffie-Hellman (ECDH) key from the other party in the key exchange. - Gets a handle to the secret agreement generated between two parties, given a object that contains the second party's public key. - A handle to the secret agreement. This information is calculated from the current object's private key and the specified public key. - To be added. - - is . - - is not an ECDH key, or it is not the correct size. - All other errors. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle - - - - - - The public key from the other party in the key exchange. - Gets a handle to the secret agreement generated between two parties, given an object that contains the second party's public key. - A handle to the secret agreement. This information is calculated from the current object's private key and the specified public key. - To be added. - - is . - - is not an key. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - to release managed and unmanaged resources; to release only unmanaged resources. - Releases the resources used by the current instance of the class. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.ECParameters - - - - - - - to include private parameters; otherwise, . - Exports the key and explicit curve parameters used by the object into an object. - The key and explicit curve parameters used by the object. - To be added. - The method cannot obtain curve values. - Explicit export is not supported by this platform. Windows 10 or higher is required. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.ECParameters - - - - - - - to include private parameters; otherwise, . - Exports the key used by the object into an object. - The key and named curve parameters used by the object. - - field contains named curve parameters; otherwise, it contains explicit parameters. - - ]]> - - The method cannot obtain curve values. - - - - - System.Core - 4.0.0.0 - - - Deserializes the key information from an XML string. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Security.Cryptography - - - System.Void - - - - - - The XML-based key information to be deserialized. - This method is not implemented. - - overload instead. - - ]]> - - This method was not overridden for this instance. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - System.Void - - - - - - - The XML-based key information to be deserialized. - One of the enumeration values that specifies the format of the XML string. The only currently accepted format is . - Deserializes the key information from an XML string by using the specified format. - To be added. - - is . - - is malformed. - - specifies an invalid format. The only accepted value is . - All other errors. - .NET Core and .NET 5+: In all cases. - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The curve used to generate an ephemeral public/private key pair. - Generates a new ephemeral public/private key pair for the specified curve. - - method) and must not be implicit. - - Characteristic-2 curves are not supported on Windows. - - ]]> - - - does not validate. - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - System.Security.Cryptography.CngAlgorithm - - - Gets or sets the hash algorithm to use when generating key material. - An object that specifies the hash algorithm. - - or value is set in the property. - - This property accepts the following algorithms: , , , , and . - - Other custom hash algorithms may also be used. - - Due to collision problems with MD5 and SHA1, Microsoft recommends . The default algorithm is . - - ]]> - - The value is . - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - [set: System.Runtime.CompilerServices.NullableContext(2)] - [<set: System.Runtime.CompilerServices.NullableContext(2)>] - - - [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - System.Byte[] - - - Gets or sets the Hash-based Message Authentication Code (HMAC) key to use when deriving key material. - The Hash-based Message Authentication Code (HMAC) key to use when deriving key material. - - value is set in the property, and the property is `false`. By default, the value is `null`. - - ]]> - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The curve's parameters to import. - Imports the specified parameters for an object as a key into the current instance. - - method replaces the existing key that this object is working with by creating a new object. If `parameters` contains only the field, then only a public key is imported. If `parameters` also contains , then a full key pair is be imported. The `parameter` value specifies the type of the curve to import. - - ]]> - - - does not validate. - - references a curve that cannot be imported. - - references a curve that is not supported by this platform. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.CngKey - - - Specifies the that is used by the current object for cryptographic operations. - The key pair used by this object to perform cryptographic operations. - To be added. - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - System.Security.Cryptography.ECDiffieHellmanKeyDerivationFunction - - - Gets or sets the key derivation function for the class. - One of the enumeration values: , , or . The default value is . - - - - The enumeration value is out of range. - - - - - - - - - - Property - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm. - The size, in bits, of the key modulus used by the asymmetric algorithm. - - method. - -]]> - - - is not permitted by . - - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - [set: System.Runtime.CompilerServices.NullableContext(2)] - [<set: System.Runtime.CompilerServices.NullableContext(2)>] - - - [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - System.Byte[] - - - Gets or sets the label value that is used for key derivation. - The label value. - - value is set in the property. By default, it is `null`. - - ]]> - - - - - - - - - - - Property - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Security.Cryptography.KeySizes[] - - - To be added. - To be added. - To be added. - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [get: System.Security.SecurityCritical] - [<get: System.Security.SecurityCritical>] - - - - System.Security.Cryptography.ECDiffieHellmanPublicKey - - - Gets the public key that can be used by another object to generate a shared secret agreement. - The public key that is associated with this instance of the object. - To be added. - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - [set: System.Runtime.CompilerServices.NullableContext(2)] - [<set: System.Runtime.CompilerServices.NullableContext(2)>] - - - [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - System.Byte[] - - - Gets or sets a value that will be appended to the secret agreement when generating key material. - The value that is appended to the secret agreement. - - or key derivation function (KDF) is used. The value is appended to the secret agreement, and the combined value is passed to the KDF to generate the key material. By default, the value is `null`. - - ]]> - - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - [set: System.Runtime.CompilerServices.NullableContext(2)] - [<set: System.Runtime.CompilerServices.NullableContext(2)>] - - - [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - System.Byte[] - - - Gets or sets a value that will be added to the beginning of the secret agreement when deriving key material. - The value that is appended to the beginning of the secret agreement during key derivation. - - property is set to one of the following values: - -- - -- - - The value is prepended to the secret agreement, and the combined value is passed to the key derivation function (KDF) to generate the key material. By default, the value is `null`. - - ]]> - - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - [set: System.Runtime.CompilerServices.NullableContext(2)] - [<set: System.Runtime.CompilerServices.NullableContext(2)>] - - - [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - System.Byte[] - - - Gets or sets the seed value that will be used when deriving key material. - The seed value. - - property is set to . By default, the value is `null`. - - ]]> - - - - - - System.Core - 4.0.0.0 - - - Serializes the key information to an XML string. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Security.Cryptography - - - System.String - - - - - - - to include private parameters; otherwise, . - This method is not implemented. - Not applicable. - - overload instead. - - ]]> - - This method was not overridden for this instance. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - System.String - - - - - - One of the enumeration values that specifies the format of the XML string. The only currently accepted format is . - Serializes the key information to an XML string by using the specified format. - A string object that contains the key information, serialized to an XML string, according to the requested format. - To be added. - - specifies an invalid format. The only accepted value is . - .NET Core and .NET 5+: In all cases. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - Gets a value that indicates whether the secret agreement is used as a Hash-based Message Authentication Code (HMAC) key to derive key material. - - if the secret agreement is used as an HMAC key to derive key material; otherwise, . - - property is set to . By default, the value is `false`. - - ]]> - - - - -
+ + + + + + + + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + System.Security.Cryptography.ECDiffieHellman + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Provides a Cryptography Next Generation (CNG) implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm. This class is used to perform cryptographic operations. + + class enables two parties to exchange private key material even if they are communicating through a public channel. Both parties can calculate the same secret value, which is referred to as the *secret agreement* in the managed Diffie-Hellman classes. The secret agreement can then be used for a variety of purposes, including as a symmetric key. However, instead of exposing the secret agreement directly, the class does some post-processing on the agreement before providing the value. This post processing is referred to as the *key derivation function (KDF)*; you can select which KDF you want to use and set its parameters through a set of properties on the instance of the Diffie-Hellman object. + +|Key derivation function|Properties| +|-----------------------------|----------------| +|| - The hash algorithm that is used to process the secret agreement.

- An optional byte array to prepend to the secret agreement before hashing it.

- An optional byte array to append to the secret agreement before hashing it.| +|| - The hash algorithm that is used to process the secret agreement.

- An optional byte array to prepend to the secret agreement before hashing it.

- An optional byte array to append to the secret agreement before hashing it.| +|| - The label for key derivation.

- The seed for key derivation.| + + The result of passing the secret agreement through the key derivation function is a byte array that may be used as key material for your application. The number of bytes of key material generated is dependent on the key derivation function; for example, SHA-256 will generate 256 bits of key material, whereas SHA-512 will generate 512 bits of key material. The basic flow of an ECDH key exchange is as follows: + +1. Alice and Bob create a key pair to use for the Diffie-Hellman key exchange operation + +2. Alice and Bob configure the KDF using parameters the agree on. + +3. Alice sends Bob her public key. + +4. Bob sends Alice his public key. + +5. Alice and Bob use each other's public keys to generate the secret agreement, and apply the KDF to the secret agreement to generate key material. + + + +## Examples + The following example shows how to use the class to establish a key exchange and how to use that key to encrypt a message that can be sent over a public channel and decrypted by the receiver. + + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/ECDiffieHellmanCng/Overview/program.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ecdiffiehellmancng/vb/program.vb" id="Snippet1"::: + + ]]>
+
+
+ + + + System.Core + 4.0.0.0 + + + Initializes a new instance of the class. + + + + + + + + + Constructor + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + + Initializes a new instance of the class with a random key pair. + + + + + + + + + + + + + Constructor + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + + + + + The size of the key. Valid key sizes are 256, 384, and 521 bits. + Initializes a new instance of the class with a random key pair, using the specified key size. + + + + + specifies an invalid length. + Cryptography Next Generation (CNG) classes are not supported on this system. + + + + + + + + + + Constructor + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + + + + The key that will be used as input to the cryptographic operations performed by the current object. + Initializes a new instance of the class by using the specified object. + To be added. + + is . + + does not specify an Elliptic Curve Diffie-Hellman (ECDH) algorithm group. + Cryptography Next Generation (CNG) classes are not supported on this system. + + + + + + + + + + Constructor + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + + + + + The curve used to generate the public/private key pair. + Creates a new instance of the class whose public/private key pair is generated over the specified curve. + + method and must be either a named or explicit prime. + + ]]> + + + does not validate. + + + + + System.Core + 4.0.0.0 + + + Performs key derivation using a specified hash algorithm. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + The other party's public key. + The hash algorithm to use to derive the key material. + A value to prepend to the derived secret before hashing. + A value to append to the derived secret before hashing. + Performs key derivation using a specified hash algorithm with optional prepended or appended data. + The hash of the shared secret after prepending or appending data as requested. + To be added. + A derived class must override this method. + The curve used by has a different size than the curve from this key. + +-or- + +The parameter does not specify a hash. + + + is . + The curve used by is different than the curve from this key. + +-or- + +This instance represents only a public key. + + + + + System.Core + 4.0.0.0 + + + Derives bytes that can be used as a key using a Hash-based Message Authentication Code (HMAC). + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + + The other party's public key. + The hash algorithm to use to derive the key material. + The key for the HMAC. + A value to prepend to the derived secret before hashing. + A value to append to the derived secret before hashing. + Performs key derivation using a specified HMAC (Hash-based Message Authentication Code) algorithm with optional prepended or appended data. + The HMAC of the shared secret after prepending or appending data as requested. + To be added. + The curve used by has a different size than the curve from this key. + +-or- + +The parameter does not specify a hash. + + is . + The curve used by is different than the curve from this key. + +-or- + +This instance represents only a public key. + + + + + System.Core + 4.0.0.0 + + + Derives the key material that is generated from the secret agreement between two parties. + + + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + An object that contains the public part of the Elliptic Curve Diffie-Hellman (ECDH) key from the other party in the key exchange. + Derives the key material that is generated from the secret agreement between two parties, given a object that contains the second party's public key. + A byte array that contains the key material. This information is generated from the secret agreement that is calculated from the current object's private key and the specified public key. + To be added. + + is . + + is invalid. Either its property does not specify or its key size does not match the key size of this instance. + This object's property specifies the key derivation function, but either or is . + All other errors. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + The public key from the other party in the key exchange. + Derives the key material that is generated from the secret agreement between two parties, given an object that contains the second party's public key. + A byte array that contains the key material. This information is generated from the secret agreement that is calculated from the current object's private key and the specified public key. + To be added. + + is . + + is not an key. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + + The other party's public key. + The ASCII-encoded PRF label. + The 64-byte PRF seed. + Performs key derivation using the TLS (Transport Layer Security) 1.1 PRF (Pseudo-Random Function). + The first 48 bytes from the TLS 1.1 PRF, using the shared secret as the key. + To be added. + A derived class must override this method. + The curve used by has a different size than the curve from this key. + + , or is . + + is not exactly 64 bytes in length. + +-or- + +The curve used by is different than the curve from this key. + +-or- + +This instance represents only a public key. + + + + + System.Core + 4.0.0.0 + + + Gets a handle to the secret agreement generated between two parties. + + method overloads are for advanced users who need a handle to the raw secret agreement instead of the key material. The secret agreement handle can be used in platform invoke calls to perform any work that is not wrapped by the class. + + ]]> + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + + Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle + + + + + + An object that contains the public part of the Elliptic Curve Diffie-Hellman (ECDH) key from the other party in the key exchange. + Gets a handle to the secret agreement generated between two parties, given a object that contains the second party's public key. + A handle to the secret agreement. This information is calculated from the current object's private key and the specified public key. + To be added. + + is . + + is not an ECDH key, or it is not the correct size. + All other errors. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle + + + + + + The public key from the other party in the key exchange. + Gets a handle to the secret agreement generated between two parties, given an object that contains the second party's public key. + A handle to the secret agreement. This information is calculated from the current object's private key and the specified public key. + To be added. + + is . + + is not an key. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + to release managed and unmanaged resources; to release only unmanaged resources. + Releases the resources used by the current instance of the class. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + To be added. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.ECParameters + + + + + + + to include private parameters; otherwise, . + Exports the key and explicit curve parameters used by the object into an object. + The key and explicit curve parameters used by the object. + To be added. + The method cannot obtain curve values. + Explicit export is not supported by this platform. Windows 10 or higher is required. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.ECParameters + + + + + + + to include private parameters; otherwise, . + Exports the key used by the object into an object. + The key and named curve parameters used by the object. + + field contains named curve parameters; otherwise, it contains explicit parameters. + + ]]> + + The method cannot obtain curve values. + + + + + System.Core + 4.0.0.0 + + + Deserializes the key information from an XML string. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Security.Cryptography + + + System.Void + + + + + + The XML-based key information to be deserialized. + This method is not implemented. + + overload instead. + + ]]> + + This method was not overridden for this instance. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + System.Void + + + + + + + The XML-based key information to be deserialized. + One of the enumeration values that specifies the format of the XML string. The only currently accepted format is . + Deserializes the key information from an XML string by using the specified format. + To be added. + + is . + + is malformed. + + specifies an invalid format. The only accepted value is . + All other errors. + .NET Core and .NET 5+: In all cases. + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The curve used to generate an ephemeral public/private key pair. + Generates a new ephemeral public/private key pair for the specified curve. + + method) and must not be implicit. + + Characteristic-2 curves are not supported on Windows. + + ]]> + + + does not validate. + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + System.Security.Cryptography.CngAlgorithm + + + Gets or sets the hash algorithm to use when generating key material. + An object that specifies the hash algorithm. + + or value is set in the property. + + This property accepts the following algorithms: , , , , and . + + Other custom hash algorithms may also be used. + + Due to collision problems with MD5 and SHA1, Microsoft recommends . The default algorithm is . + + ]]> + + The value is . + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + [set: System.Runtime.CompilerServices.NullableContext(2)] + [<set: System.Runtime.CompilerServices.NullableContext(2)>] + + + [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + System.Byte[] + + + Gets or sets the Hash-based Message Authentication Code (HMAC) key to use when deriving key material. + The Hash-based Message Authentication Code (HMAC) key to use when deriving key material. + + value is set in the property, and the property is `false`. By default, the value is `null`. + + ]]> + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The bytes to use as a password when decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The password to use for decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The curve's parameters to import. + Imports the specified parameters for an object as a key into the current instance. + + method replaces the existing key that this object is working with by creating a new object. If `parameters` contains only the field, then only a public key is imported. If `parameters` also contains , then a full key pair is be imported. The `parameter` value specifies the type of the curve to import. + + ]]> + + + does not validate. + + references a curve that cannot be imported. + + references a curve that is not supported by this platform. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object. + To be added. + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.CngKey + + + Specifies the that is used by the current object for cryptographic operations. + The key pair used by this object to perform cryptographic operations. + To be added. + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + System.Security.Cryptography.ECDiffieHellmanKeyDerivationFunction + + + Gets or sets the key derivation function for the class. + One of the enumeration values: , , or . The default value is . + + + + The enumeration value is out of range. + + + + + + + + + + Property + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm. + The size, in bits, of the key modulus used by the asymmetric algorithm. + + method. + +]]> + + + is not permitted by . + + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + [set: System.Runtime.CompilerServices.NullableContext(2)] + [<set: System.Runtime.CompilerServices.NullableContext(2)>] + + + [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + System.Byte[] + + + Gets or sets the label value that is used for key derivation. + The label value. + + value is set in the property. By default, it is `null`. + + ]]> + + + + + + + + + + + Property + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Security.Cryptography.KeySizes[] + + + Gets the key sizes that are supported by the asymmetric algorithm. + An array that contains the key sizes supported by the asymmetric algorithm. + To be added. + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [get: System.Security.SecurityCritical] + [<get: System.Security.SecurityCritical>] + + + + System.Security.Cryptography.ECDiffieHellmanPublicKey + + + Gets the public key that can be used by another object to generate a shared secret agreement. + The public key that is associated with this instance of the object. + To be added. + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + [set: System.Runtime.CompilerServices.NullableContext(2)] + [<set: System.Runtime.CompilerServices.NullableContext(2)>] + + + [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + System.Byte[] + + + Gets or sets a value that will be appended to the secret agreement when generating key material. + The value that is appended to the secret agreement. + + or key derivation function (KDF) is used. The value is appended to the secret agreement, and the combined value is passed to the KDF to generate the key material. By default, the value is `null`. + + ]]> + + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + [set: System.Runtime.CompilerServices.NullableContext(2)] + [<set: System.Runtime.CompilerServices.NullableContext(2)>] + + + [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + System.Byte[] + + + Gets or sets a value that will be added to the beginning of the secret agreement when deriving key material. + The value that is appended to the beginning of the secret agreement during key derivation. + + property is set to one of the following values: + +- + +- + + The value is prepended to the secret agreement, and the combined value is passed to the key derivation function (KDF) to generate the key material. By default, the value is `null`. + + ]]> + + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + [set: System.Runtime.CompilerServices.NullableContext(2)] + [<set: System.Runtime.CompilerServices.NullableContext(2)>] + + + [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + [set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + System.Byte[] + + + Gets or sets the seed value that will be used when deriving key material. + The seed value. + + property is set to . By default, the value is `null`. + + ]]> + + + + + + System.Core + 4.0.0.0 + + + Serializes the key information to an XML string. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Security.Cryptography + + + System.String + + + + + + + to include private parameters; otherwise, . + This method is not implemented. + Not applicable. + + overload instead. + + ]]> + + This method was not overridden for this instance. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + System.String + + + + + + One of the enumeration values that specifies the format of the XML string. The only currently accepted format is . + Serializes the key information to an XML string by using the specified format. + A string object that contains the key information, serialized to an XML string, according to the requested format. + To be added. + + specifies an invalid format. The only accepted value is . + .NET Core and .NET 5+: In all cases. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The byte span to receive the PKCS#8 PrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the secret agreement is used as a Hash-based Message Authentication Code (HMAC) key to derive key material. + + if the secret agreement is used as an HMAC key to derive key material; otherwise, . + + property is set to . By default, the value is `false`. + + ]]> + + + + +
diff --git a/xml/System.Security.Cryptography/ECDsaCng.xml b/xml/System.Security.Cryptography/ECDsaCng.xml index 01c2b2100cc..c37efb8a9c3 100644 --- a/xml/System.Security.Cryptography/ECDsaCng.xml +++ b/xml/System.Security.Cryptography/ECDsaCng.xml @@ -1,2069 +1,2074 @@ - - - - - - - - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 3.5.0.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - System.Security.Cryptography.ECDsa - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - Provides a Cryptography Next Generation (CNG) implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA). - - factory methods instead of a specific derived implementation. - - - -## Examples - The following example shows how to use the class to sign a message and how to use the signature to verify that the message has not been altered. - - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/ECDsaCng/Overview/program.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ecdsacng/vb/program.vb" id="Snippet1"::: - - ]]> - - - - - - System.Security.Cryptography.Cng - 4.2.0.0 - - - Initializes a new instance of the class. - - - - - - - - - Constructor - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 3.5.0.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - - Initializes a new instance of the class with a random key pair. - - property to 521 and when a key is needed the saved size is used to identify the target curve. -If a key is loaded via the method, or other key import method, the key size from this constructor has no meaning. - - ]]> - - Cryptography Next Generation (CNG) classes are not supported on this system. - - - - - - - - - - - Constructor - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 3.5.0.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - - - - - The size of the key. Valid key sizes are 256, 384, and 521 bits. - Initializes a new instance of the class with a specified target key size. - - property to the provided value and when a key is needed the saved size is used to identify the target curve. -If a key is loaded via the method, or other key import method, the key size from this constructor has no meaning. - - - ]]> - - Cryptography Next Generation (CNG) classes are not supported on this system. - - specifies an invalid length. - - - - - - - - - - - Constructor - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 3.5.0.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - - - - The key that will be used as input to the cryptographic operations performed by the current object. - Initializes a new instance of the class by using the specified object. - To be added. - - does not specify an Elliptic Curve Digital Signature Algorithm (ECDSA) group. - - is . - Cryptography Next Generation (CNG) classes are not supported on this system. - - - - - - - - - - Constructor - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - - - - - The curve used to generate the public/private key pair. - Initializes a new instance of the class whose public/private key pair is generated over the specified curve. - - method and must be either a named or explicit prime. - - ]]> - - - does not validate. - - is . - if does not contain an Oid with a FriendlyName. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 3.5.0.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - to release managed and unmanaged resources; to release only unmanaged resources. - Releases the resources used by the current instance of the class. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.ECParameters - - - - - - - to include private parameters; otherwise, . - Exports the key and explicit curve parameters used by the Elliptic curve cryptography (ECC) object into an object. - The key and explicit curve parameters used by the ECC object. - To be added. - An error occurred while obtaining the curve values. - Explicit export is not supported by this platform. Windows 10 or higher is required. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.ECParameters - - - - - - - to include private parameters; otherwise, . - Exports the key used by the Elliptic curve cryptography (ECC) object into an object. If the key was created as a named curve, the field contains named curve parameters; otherwise, it contains explicit parameters. - The key and named curve parameters used by the ECC object. - To be added. - An error occurred while obtaining the curve values. - - - - - System.Core - 4.0.0.0 - - - Deserializes the key information from an XML string. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Security.Cryptography - - - System.Void - - - - - - The XML-based key information to be deserialized. - This method is not implemented. - - overload instead. - - ]]> - - This method was not overridden for this instance. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - System.Void - - - - - - - The XML-based key information to be deserialized. - One of the enumeration values that specifies the format of the XML string. The only currently accepted format is . - Deserializes the key information from an XML string by using the specified format. - To be added. - - is . - - specifies an invalid format. The only accepted value is . - All other errors. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The curve to use to generate the key. - Generates a new ephemeral public/private key pair for the specified curve, replacing the current key. - To be added. - - does not validate. - - - - - - - - - - Property - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] - [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] - - - - System.Security.Cryptography.CngAlgorithm - - - Gets or sets the hash algorithm to use when signing and verifying data. - An object that specifies the hash algorithm. - - , , , , and . - - Other custom hash algorithms may also be used. - - Due to collision problems with MD5 and SHA1, Microsoft recommends . The default algorithm is . - - This property is not used if you are signing or verifying data that is already hashed. - - ]]> - - The value is . - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - - - System.Byte[] - - - - - - - The binary stream to hash. - The algorithm to use to hash the data. - Computes the hash value of the specified binary stream by using the specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - - - System.Byte[] - - - - - - - - - The data to be hashed. - The index of the first byte in to be hashed. - The number of bytes to hash. - The algorithm to use to hash the data. - Computes the hash value of the specified portion of a byte array by using the specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The curve parameters. - Replaces the existing key that the current instance is working with by creating a new for the parameters structure. - - , only a public key is imported. If `parameters` also contains , a full key pair is imported. The field specifies the type of the curve to import. - - ]]> - - - does not contain valid values. - - references a curve that cannot be imported. - - references a curve that is not supported by this platform. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Property - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 3.5.0.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.CngKey - - - Gets or sets the key to use when signing and verifying data. - An object that specifies the key. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm. - The size, in bits, of the key modulus used by the asymmetric algorithm. - - method. - -]]> - - - is not permitted by . - - - - - - - - - - - Property - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.KeySizes[] - - - Gets the key sizes, in bits, that are supported by the property setter. - An array that contains the key sizes supported by the property setter. - - - - - - - - - System.Core - 4.0.0.0 - - - Generates a signature. - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - The message data to be signed. - Generates a signature for the specified data. - A digital signature for the specified data. - - property, and then signing the result. - - The flag is required if the Cryptography Next Generation (CNG) key is not randomly generated by the object. - - ]]> - - - is . - The key information that is associated with the instance does not have a private key. - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - The data stream to be signed. - Generates a signature for the specified data stream, reading to the end of the stream. - A digital signature for the specified data stream. - - property, and then signing the result. - - The flag is required if the Cryptography Next Generation (CNG) key is not randomly generated by the object. - - ]]> - - - is . - The key information that is associated with the instance does not have a private key. - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - - The message data to be signed. - The location in the string at which to start signing. - The length of the string, in characters, following that will be signed. - Generates a digital signature for the specified length of data, beginning at the specified offset. - A digital signature for the specified length of data. - - property, and then signing the result - - The flag is required if the Cryptography Next Generation (CNG) key is not randomly generated by the object. - - ]]> - - - is . - - or caused reading outside the bounds of the data string. - The key information that is associated with the instance does not have a private key. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 3.5.0.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - The hash value of the data to be signed. - Generates a signature for the specified hash value. - A digital signature for the specified hash value. - - flag is required if the Cryptography Next Generation (CNG) key is not randomly generated by the object. - - ]]> - - - is . - The key information that is associated with the instance does not have a private key. - - - - - System.Core - 4.0.0.0 - - - Serializes the key information to an XML string. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Security.Cryptography - - - System.String - - - - - - - to include private parameters; otherwise, . - This method is not implemented. - Not applicable. - - overload instead. - - ]]> - - This method is not implemented. - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - System.String - - - - - - One of the enumeration values that specifies the format of the XML string. The only currently accepted format is . - Serializes the key information to an XML string by using the specified format. - A string object that contains the key information, serialized to an XML string according to the requested format. - To be added. - - specifies an invalid format. The only accepted value is . - All other errors. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - System.Core - 4.0.0.0 - - - Verifies a digital signature. - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - The data that was signed. - The signature to be verified. - Verifies the digital signature of the specified data. - - if the signature is valid; otherwise, . - - property, and then signing the result. - - ]]> - - - or is . - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - The data stream that was signed. - The signature to be verified. - Verifies the digital signature of the specified data stream, reading to the end of the stream. - - if the signature is valid; otherwise, . - - property before verification. - - ]]> - - - or is . - - - - - - - - - - - Method - - System.Core - 3.5.0.0 - 4.0.0.0 - - - System.Security.Cryptography.Cng - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - - - The data that was signed. - The location in the data at which the signed data begins. - The length of the data, in characters, following that will be signed. - The signature to be verified. - Verifies a signature for the specified length of data, beginning at the specified offset. - - if the signature is valid; otherwise, . - - property before verification. - - ]]> - - - or is less then zero. - - -or- - - or is larger than the length of the byte array passed in the parameter. - - or is . - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 3.5.0.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecurityCritical] - [<System.Security.SecurityCritical>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - The hash value of the data to be verified. - The digital signature of the data to be verified against the hash value. - Verifies that a digital signature is appropriate for the current key and provided data hash. - - if the signature is valid; otherwise, . - To be added. - - or is . - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - + + + + + + + + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 3.5.0.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + System.Security.Cryptography.ECDsa + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Provides a Cryptography Next Generation (CNG) implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA). + + factory methods instead of a specific derived implementation. + + + +## Examples + The following example shows how to use the class to sign a message and how to use the signature to verify that the message has not been altered. + + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/ECDsaCng/Overview/program.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ecdsacng/vb/program.vb" id="Snippet1"::: + + ]]> + + + + + + System.Security.Cryptography.Cng + 4.2.0.0 + + + Initializes a new instance of the class. + + + + + + + + + Constructor + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 3.5.0.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + + Initializes a new instance of the class with a random key pair. + + property to 521 and when a key is needed the saved size is used to identify the target curve. +If a key is loaded via the method, or other key import method, the key size from this constructor has no meaning. + + ]]> + + Cryptography Next Generation (CNG) classes are not supported on this system. + + + + + + + + + + + Constructor + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 3.5.0.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + + + + + The size of the key. Valid key sizes are 256, 384, and 521 bits. + Initializes a new instance of the class with a specified target key size. + + property to the provided value and when a key is needed the saved size is used to identify the target curve. +If a key is loaded via the method, or other key import method, the key size from this constructor has no meaning. + + + ]]> + + Cryptography Next Generation (CNG) classes are not supported on this system. + + specifies an invalid length. + + + + + + + + + + + Constructor + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 3.5.0.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + + + + The key that will be used as input to the cryptographic operations performed by the current object. + Initializes a new instance of the class by using the specified object. + To be added. + + does not specify an Elliptic Curve Digital Signature Algorithm (ECDSA) group. + + is . + Cryptography Next Generation (CNG) classes are not supported on this system. + + + + + + + + + + Constructor + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + + + + + The curve used to generate the public/private key pair. + Initializes a new instance of the class whose public/private key pair is generated over the specified curve. + + method and must be either a named or explicit prime. + + ]]> + + + does not validate. + + is . + if does not contain an Oid with a FriendlyName. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 3.5.0.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + to release managed and unmanaged resources; to release only unmanaged resources. + Releases the resources used by the current instance of the class. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.ECParameters + + + + + + + to include private parameters; otherwise, . + Exports the key and explicit curve parameters used by the Elliptic curve cryptography (ECC) object into an object. + The key and explicit curve parameters used by the ECC object. + To be added. + An error occurred while obtaining the curve values. + Explicit export is not supported by this platform. Windows 10 or higher is required. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.ECParameters + + + + + + + to include private parameters; otherwise, . + Exports the key used by the Elliptic curve cryptography (ECC) object into an object. If the key was created as a named curve, the field contains named curve parameters; otherwise, it contains explicit parameters. + The key and named curve parameters used by the ECC object. + To be added. + An error occurred while obtaining the curve values. + + + + + System.Core + 4.0.0.0 + + + Deserializes the key information from an XML string. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Security.Cryptography + + + System.Void + + + + + + The XML-based key information to be deserialized. + This method is not implemented. + + overload instead. + + ]]> + + This method was not overridden for this instance. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + System.Void + + + + + + + The XML-based key information to be deserialized. + One of the enumeration values that specifies the format of the XML string. The only currently accepted format is . + Deserializes the key information from an XML string by using the specified format. + To be added. + + is . + + specifies an invalid format. The only accepted value is . + All other errors. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The curve to use to generate the key. + Generates a new ephemeral public/private key pair for the specified curve, replacing the current key. + To be added. + + does not validate. + + + + + + + + + + Property + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] + [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] + + + + System.Security.Cryptography.CngAlgorithm + + + Gets or sets the hash algorithm to use when signing and verifying data. + An object that specifies the hash algorithm. + + , , , , and . + + Other custom hash algorithms may also be used. + + Due to collision problems with MD5 and SHA1, Microsoft recommends . The default algorithm is . + + This property is not used if you are signing or verifying data that is already hashed. + + ]]> + + The value is . + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + + + System.Byte[] + + + + + + + The binary stream to hash. + The algorithm to use to hash the data. + Computes the hash value of the specified binary stream by using the specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + + + System.Byte[] + + + + + + + + + The data to be hashed. + The index of the first byte in to be hashed. + The number of bytes to hash. + The algorithm to use to hash the data. + Computes the hash value of the specified portion of a byte array by using the specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The bytes to use as a password when decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The password to use for decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The curve parameters. + Replaces the existing key that the current instance is working with by creating a new for the parameters structure. + + , only a public key is imported. If `parameters` also contains , a full key pair is imported. The field specifies the type of the curve to import. + + ]]> + + + does not contain valid values. + + references a curve that cannot be imported. + + references a curve that is not supported by this platform. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object. + To be added. + + + + + + + + + + + Property + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 3.5.0.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.CngKey + + + Gets or sets the key to use when signing and verifying data. + An object that specifies the key. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm. + The size, in bits, of the key modulus used by the asymmetric algorithm. + + method. + +]]> + + + is not permitted by . + + + + + + + + + + + Property + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.KeySizes[] + + + Gets the key sizes, in bits, that are supported by the property setter. + An array that contains the key sizes supported by the property setter. + + + + + + + + + System.Core + 4.0.0.0 + + + Generates a signature. + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + The message data to be signed. + Generates a signature for the specified data. + A digital signature for the specified data. + + property, and then signing the result. + + The flag is required if the Cryptography Next Generation (CNG) key is not randomly generated by the object. + + ]]> + + + is . + The key information that is associated with the instance does not have a private key. + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + The data stream to be signed. + Generates a signature for the specified data stream, reading to the end of the stream. + A digital signature for the specified data stream. + + property, and then signing the result. + + The flag is required if the Cryptography Next Generation (CNG) key is not randomly generated by the object. + + ]]> + + + is . + The key information that is associated with the instance does not have a private key. + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + + The message data to be signed. + The location in the string at which to start signing. + The length of the string, in characters, following that will be signed. + Generates a digital signature for the specified length of data, beginning at the specified offset. + A digital signature for the specified length of data. + + property, and then signing the result + + The flag is required if the Cryptography Next Generation (CNG) key is not randomly generated by the object. + + ]]> + + + is . + + or caused reading outside the bounds of the data string. + The key information that is associated with the instance does not have a private key. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 3.5.0.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + The hash value of the data to be signed. + Generates a signature for the specified hash value. + A digital signature for the specified hash value. + + flag is required if the Cryptography Next Generation (CNG) key is not randomly generated by the object. + + ]]> + + + is . + The key information that is associated with the instance does not have a private key. + + + + + System.Core + 4.0.0.0 + + + Serializes the key information to an XML string. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Security.Cryptography + + + System.String + + + + + + + to include private parameters; otherwise, . + This method is not implemented. + Not applicable. + + overload instead. + + ]]> + + This method is not implemented. + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + System.String + + + + + + One of the enumeration values that specifies the format of the XML string. The only currently accepted format is . + Serializes the key information to an XML string by using the specified format. + A string object that contains the key information, serialized to an XML string according to the requested format. + To be added. + + specifies an invalid format. The only accepted value is . + All other errors. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The byte span to receive the PKCS#8 PrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + To be added. + The buffer to receive the signature. + When this method returns, the total number of bytes written into destination. This parameter is treated as uninitialized. + Attempts to compute the ECDSA digital signature for the specified read-only span of bytes representing a data hash into the provided destination by using the current key. + + false if destination is not long enough to receive the signature. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + System.Core + 4.0.0.0 + + + Verifies a digital signature. + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + The data that was signed. + The signature to be verified. + Verifies the digital signature of the specified data. + + if the signature is valid; otherwise, . + + property, and then signing the result. + + ]]> + + + or is . + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + The data stream that was signed. + The signature to be verified. + Verifies the digital signature of the specified data stream, reading to the end of the stream. + + if the signature is valid; otherwise, . + + property before verification. + + ]]> + + + or is . + + + + + + + + + + + Method + + System.Core + 3.5.0.0 + 4.0.0.0 + + + System.Security.Cryptography.Cng + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + + + The data that was signed. + The location in the data at which the signed data begins. + The length of the data, in characters, following that will be signed. + The signature to be verified. + Verifies a signature for the specified length of data, beginning at the specified offset. + + if the signature is valid; otherwise, . + + property before verification. + + ]]> + + + or is less then zero. + + -or- + + or is larger than the length of the byte array passed in the parameter. + + or is . + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 3.5.0.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecurityCritical] + [<System.Security.SecurityCritical>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + The hash value of the data to be verified. + The digital signature of the data to be verified against the hash value. + Verifies that a digital signature is appropriate for the current key and provided data hash. + + if the signature is valid; otherwise, . + To be added. + + or is . + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The hash value of the data to be verified. + The digital signature of the data to be verified against the hash value. + Verifies that a digital signature is appropriate for the current key and provided data hash. + + true if the signature is valid; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + diff --git a/xml/System.Security.Cryptography/HMACSHA3_256.xml b/xml/System.Security.Cryptography/HMACSHA3_256.xml index 7cc1ee00518..73592b5abee 100644 --- a/xml/System.Security.Cryptography/HMACSHA3_256.xml +++ b/xml/System.Security.Cryptography/HMACSHA3_256.xml @@ -1,677 +1,739 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.HMAC - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - To be added. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - To be added. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Threading.Tasks.ValueTask<System.Int32> - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - To be added. - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 256 - - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 32 - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.HMAC + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Computes a Hash-based Message Authentication Code (HMAC) by using the SHA3-256 hash function. + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + Initializes a new instance of the class with a randomly generated key. + + + is a type of keyed hash algorithm that is constructed from the SHA3-256 hash function and used as a Hash-based Message Authentication Code (HMAC). The HMAC process mixes a secret key with the message data, hashes the result with the hash function, mixes that hash value with the secret key again, and then applies the hash function a second time. The output hash is 256 bits in length. + + This constructor uses a 136-byte, randomly generated key. + + + + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + + + The secret key for . The key can be any length. + Initializes a new instance of the class with the specified key data. + To be added. + + is . + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + + + + The HMAC key. + The data to HMAC. + Computes the HMAC of data using the SHA3-256 algorithm. + The HMAC of the data. + To be added. + + or is . + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + + + + The HMAC key. + The stream to HMAC. + Computes the HMAC of a stream using the SHA3-256 algorithm. + The HMAC of the data. + To be added. + + or is . + + does not support reading. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The HMAC key. + The stream to HMAC. + Computes the HMAC of a stream using the SHA3-256 algorithm. + The HMAC of the data. + To be added. + + is . + + does not support reading. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + The HMAC key. + The data to HMAC. + Computes the HMAC of data using the SHA3-256 algorithm. + The HMAC of the data. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The HMAC key. + The stream to HMAC. + The buffer to receive the HMAC value. + Computes the HMAC of a stream using the SHA3-256 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated HMAC + size. The SHA3-256 algorithm always produces a 256-bit HMAC, or 32 bytes. + +-or- + + does not support reading. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + + The HMAC key. + The data to HMAC. + The buffer to receive the HMAC value. + Computes the HMAC of data using the SHA3-256 algorithm. + The total number of bytes written to . + To be added. + The buffer in is too small to hold the calculated hash + size. The SHA3-256 algorithm always produces a 256-bit HMAC, or 32 bytes. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + + The HMAC key. + The stream to HMAC. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the HMAC of a stream using the SHA3-256 algorithm. + The HMAC of the data. + To be added. + + or is . + + does not support reading. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The HMAC key. + The stream to HMAC. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the HMAC of a stream using the SHA3-256 algorithm. + The HMAC of the data. + To be added. + + is . + + does not support reading. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Threading.Tasks.ValueTask<System.Int32> + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The HMAC key. + The stream to HMAC. + The buffer to receive the HMAC value. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the HMAC of a stream using the SHA3-256 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated hash + size. The SHA3-256 algorithm always produces a 256-bit hash, or 32 bytes. + +-or- + + does not support reading. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + To be added. + To be added. + To be added. + + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 256 + + The hash size produced by the HMAC SHA3-256 algorithm, in bits. + To be added. + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 32 + + The hash size produced by the HMAC SHA3-256 algorithm, in bytes. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the algorithm is supported on the current platform. + + if the algorithm is supported; otherwise, . + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + The HMAC key. + The data to HMAC. + The buffer to receive the HMAC value. + When this method returns, the total number of bytes written into . + Attempts to compute the HMAC of data using the SHA3-256 algorithm. + + if is too small to hold the calculated hash, otherwise. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + diff --git a/xml/System.Security.Cryptography/HMACSHA3_384.xml b/xml/System.Security.Cryptography/HMACSHA3_384.xml index bfb05ad775e..d6e5234c8f8 100644 --- a/xml/System.Security.Cryptography/HMACSHA3_384.xml +++ b/xml/System.Security.Cryptography/HMACSHA3_384.xml @@ -1,677 +1,739 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.HMAC - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - To be added. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - To be added. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Threading.Tasks.ValueTask<System.Int32> - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - To be added. - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 384 - - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 48 - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.HMAC + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Computes a Hash-based Message Authentication Code (HMAC) by using the SHA3-384 hash function. + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + Initializes a new instance of the class with a randomly generated key. + + + is a type of keyed hash algorithm that is constructed from the SHA3-384 hash function and used as a Hash-based Message Authentication Code (HMAC). The HMAC process mixes a secret key with the message data, hashes the result with the hash function, mixes that hash value with the secret key again, and then applies the hash function a second time. The output hash is 384 bits in length. + + This constructor uses a 104-byte, randomly generated key. + + + + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + + + The secret key for . The key can be any length. + Initializes a new instance of the class with the specified key data. + To be added. + + is . + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + + + + The HMAC key. + The data to HMAC. + Computes the HMAC of data using the SHA3-384 algorithm. + The HMAC of the data. + To be added. + + or is . + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + + + + The HMAC key. + The stream to HMAC. + Computes the HMAC of a stream using the SHA3-384 algorithm. + The HMAC of the data. + To be added. + + or is . + + does not support reading. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The HMAC key. + The stream to HMAC. + Computes the HMAC of a stream using the SHA3-384 algorithm. + The HMAC of the data. + To be added. + + is . + + does not support reading. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + The HMAC key. + The data to HMAC. + Computes the HMAC of data using the SHA3-384 algorithm. + The HMAC of the data. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The HMAC key. + The stream to HMAC. + The buffer to receive the HMAC value. + Computes the HMAC of a stream using the SHA3-384 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated HMAC + size. The SHA3-384 algorithm always produces a 384-bit HMAC, or 48 bytes. + +-or- + + does not support reading. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + + The HMAC key. + The data to HMAC. + The buffer to receive the HMAC value. + Computes the HMAC of data using the SHA3-384 algorithm. + The total number of bytes written to . + To be added. + The buffer in is too small to hold the calculated hash + size. The SHA3-384 algorithm always produces a 384-bit HMAC, or 48 bytes. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + + The HMAC key. + The stream to HMAC. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the HMAC of a stream using the SHA3-384 algorithm. + The HMAC of the data. + To be added. + + or is . + + does not support reading. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The HMAC key. + The stream to HMAC. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the HMAC of a stream using the SHA3-384 algorithm. + The HMAC of the data. + To be added. + + is . + + does not support reading. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Threading.Tasks.ValueTask<System.Int32> + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The HMAC key. + The stream to HMAC. + The buffer to receive the HMAC value. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the HMAC of a stream using the SHA3-384 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated hash + size. The SHA3-384 algorithm always produces a 384-bit hash, or 48 bytes. + +-or- + + does not support reading. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + To be added. + To be added. + To be added. + + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 384 + + The hash size produced by the HMAC SHA3-384 algorithm, in bits. + To be added. + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 48 + + The hash size produced by the HMAC SHA3-384 algorithm, in bytes. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the algorithm is supported on the current platform. + + if the algorithm is supported; otherwise, . + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + The HMAC key. + The data to HMAC. + The buffer to receive the HMAC value. + When this method returns, the total number of bytes written into . + Attempts to compute the HMAC of data using the SHA3-384 algorithm. + + if is too small to hold the calculated hash, otherwise. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + diff --git a/xml/System.Security.Cryptography/HMACSHA3_512.xml b/xml/System.Security.Cryptography/HMACSHA3_512.xml index 96bf4e7b5e5..f663d6c99ab 100644 --- a/xml/System.Security.Cryptography/HMACSHA3_512.xml +++ b/xml/System.Security.Cryptography/HMACSHA3_512.xml @@ -1,677 +1,739 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.HMAC - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - To be added. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - To be added. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Threading.Tasks.ValueTask<System.Int32> - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - - To be added. - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 512 - - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 64 - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.HMAC + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Computes a Hash-based Message Authentication Code (HMAC) by using the SHA3-512 hash function. + To be added. + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + Initializes a new instance of the class with a randomly generated key. + + + is a type of keyed hash algorithm that is constructed from the SHA3-512 hash function and used as a Hash-based Message Authentication Code (HMAC). The HMAC process mixes a secret key with the message data, hashes the result with the hash function, mixes that hash value with the secret key again, and then applies the hash function a second time. The output hash is 512 bits in length. + + This constructor uses a 72-byte, randomly generated key. + + + + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + + + The secret key for . The key can be any length. + Initializes a new instance of the class with the specified key data. + To be added. + + is . + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + + + + The HMAC key. + The data to HMAC. + Computes the HMAC of data using the SHA3-512 algorithm. + The HMAC of the data. + To be added. + + or is . + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + + + + The HMAC key. + The stream to HMAC. + Computes the HMAC of a stream using the SHA3-512 algorithm. + The HMAC of the data. + To be added. + + or is . + + does not support reading. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The HMAC key. + The stream to HMAC. + Computes the HMAC of a stream using the SHA3-512 algorithm. + The HMAC of the data. + To be added. + + is . + + does not support reading. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + The HMAC key. + The data to HMAC. + Computes the HMAC of data using the SHA3-512 algorithm. + The HMAC of the data. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The HMAC key. + The stream to HMAC. + The buffer to receive the HMAC value. + Computes the HMAC of a stream using the SHA3-512 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated HMAC + size. The SHA3-512 algorithm always produces a 512-bit HMAC, or 64 bytes. + +-or- + + does not support reading. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + + The HMAC key. + The data to HMAC. + The buffer to receive the HMAC value. + Computes the HMAC of data using the SHA3-512 algorithm. + The total number of bytes written to . + To be added. + The buffer in is too small to hold the calculated hash + size. The SHA3-512 algorithm always produces a 512-bit HMAC, or 64 bytes. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + + The HMAC key. + The stream to HMAC. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the HMAC of a stream using the SHA3-512 algorithm. + The HMAC of the data. + To be added. + + or is . + + does not support reading. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The HMAC key. + The stream to HMAC. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the HMAC of a stream using the SHA3-512 algorithm. + The HMAC of the data. + To be added. + + is . + + does not support reading. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Threading.Tasks.ValueTask<System.Int32> + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The HMAC key. + The stream to HMAC. + The buffer to receive the HMAC value. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the HMAC of a stream using the SHA3-512 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated hash + size. The SHA3-512 algorithm always produces a 512-bit hash, or 64 bytes. + +-or- + + does not support reading. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + + To be added. + To be added. + To be added. + + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 512 + + The hash size produced by the HMAC SHA3-512 algorithm, in bits. + To be added. + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 64 + + The hash size produced by the HMAC SHA3-512 algorithm, in bytes. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the algorithm is supported on the current platform. + + if the algorithm is supported; otherwise, . + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + To be added. + To be added. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + The HMAC key. + The data to HMAC. + The buffer to receive the HMAC value. + When this method returns, the total number of bytes written into . + Attempts to compute the HMAC of data using the SHA3-512 algorithm. + + if is too small to hold the calculated hash, otherwise. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + diff --git a/xml/System.Security.Cryptography/HashAlgorithmName.xml b/xml/System.Security.Cryptography/HashAlgorithmName.xml index 36f4e84df24..4281ff8bfae 100644 --- a/xml/System.Security.Cryptography/HashAlgorithmName.xml +++ b/xml/System.Security.Cryptography/HashAlgorithmName.xml @@ -1,880 +1,880 @@ - - - - - - - - - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.ValueType - - - - System.IEquatable<System.Security.Cryptography.HashAlgorithmName> - - - - - [System.Runtime.CompilerServices.IsReadOnly] - [<System.Runtime.CompilerServices.IsReadOnly>] - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - Specifies the name of a cryptographic hash algorithm. - - structure includes some static properties that return predefined hash algorithm names, as well as a property that can represent a custom hash algorithm name as a strongly-typed string. Hash algorithm names are case-sensitive. - - Asymmetric algorithms implemented using Microsoft's CNG (Cryptographic Next Generation) API interpret the underlying string value as a [CNG algorithm identifier](/windows/win32/seccng/cng-algorithm-identifiers). - - Asymmetric algorithms implemented using other technologies: - -- Must recognize at least "MD5", "SHA1", "SHA256", "SHA384", and "SHA512". - -- Should recognize additional CNG identifiers for any additional hash algorithms that they support. - -Due to collision problems with MD5 and SHA1, Microsoft recommends a security model based on SHA256 or better. - - ]]> - - - - - - - - - - - - Constructor - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - The custom hash algorithm name. - Initializes a new instance of the structure with a custom name. - - - - - - - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - - - Returns a value that indicates whether two values are equal. - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] - [<System.Diagnostics.CodeAnalysis.NotNullWhen(true)>] - - - - - - The object to compare with the current instance. - Returns a value that indicates whether the current instance and a specified object are equal. - - if is a object and its property is equal to that of the current instance. The comparison is ordinal and case-sensitive. - To be added. - - - - - - - - - - Method - - M:System.IEquatable`1.Equals(`0) - - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - The object to compare with the current instance. - Returns a value that indicates whether two instances are equal. - - if the property of is equal to that of the current instance. The comparison is ordinal and case-sensitive. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.HashAlgorithmName - - - - - - The OID of the hash algorithm. - Converts the specified OID to a hash algorithm name. - The hash algorithm name identified by the OID. - To be added. - - is . - - does not represent a known hash algorithm. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - - Returns the hash code for the current instance. - The hash code for the current instance, or 0 if no value was supplied to the constructor. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.HashAlgorithmName - - - Gets a hash algorithm name that represents "MD5". - A hash algorithm name that represents "MD5". - Due to collision problems with MD5, Microsoft recommends a security model based on SHA256 or better. - - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.String - - - Gets the underlying string representation of the algorithm name. - The string representation of the algorithm name, or if no hash algorithm is available. - - - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - The first object to compare. - The second object to compare. - Determines whether two specified objects are equal. - - if both and have the same value; otherwise, . - - method defines the operation of the equality operator for values. - - ]]> - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - The first object to compare. - The second object to compare. - Determines whether two specified objects are not equal. - - if both and do not have the same value; otherwise, . - - method defines the operation of the inequality operator for values. - - ]]> - - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.HashAlgorithmName - - - Gets a hash algorithm name that represents "SHA1". - A hash algorithm name that represents "SHA1". - Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better. - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.HashAlgorithmName - - - Gets a hash algorithm name that represents "SHA256". - A hash algorithm name that represents "SHA256". - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Security.Cryptography.HashAlgorithmName - - - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Security.Cryptography.HashAlgorithmName - - - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Primitives - - - netstandard - - - System.Security.Cryptography.HashAlgorithmName - - - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.HashAlgorithmName - - - Gets a hash algorithm name that represents "SHA384". - A hash algorithm name that represents "SHA384". - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.HashAlgorithmName - - - Gets a hash algorithm name that represents "SHA512". - A hash algorithm name that represents "SHA512". - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.String - - - - Returns the string representation of the current instance. - The string representation of the current instance. - - method returns the property, if it has been assigned. Otherwise, it returns . - - ]]> - - - - - - - - - - - Method - - System.Security.Cryptography.Primitives - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Boolean - - - - - - - The OID of the hash algorithm. - When this method returns , the hash algorithm. When this method returns , contains default. - Tries to convert the specified OID to a hash algorithm name. - - if the OID was successfully mapped to a hash algorithm; otherwise . - To be added. - - is . - - - - + + + + + + + + + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.ValueType + + + + System.IEquatable<System.Security.Cryptography.HashAlgorithmName> + + + + + [System.Runtime.CompilerServices.IsReadOnly] + [<System.Runtime.CompilerServices.IsReadOnly>] + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + Specifies the name of a cryptographic hash algorithm. + + structure includes some static properties that return predefined hash algorithm names, as well as a property that can represent a custom hash algorithm name as a strongly-typed string. Hash algorithm names are case-sensitive. + + Asymmetric algorithms implemented using Microsoft's CNG (Cryptographic Next Generation) API interpret the underlying string value as a [CNG algorithm identifier](/windows/win32/seccng/cng-algorithm-identifiers). + + Asymmetric algorithms implemented using other technologies: + +- Must recognize at least "MD5", "SHA1", "SHA256", "SHA384", and "SHA512". + +- Should recognize additional CNG identifiers for any additional hash algorithms that they support. + +Due to collision problems with MD5 and SHA1, Microsoft recommends a security model based on SHA256 or better. + + ]]> + + + + + + + + + + + + Constructor + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + The custom hash algorithm name. + Initializes a new instance of the structure with a custom name. + + + + + + + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + + + Returns a value that indicates whether two values are equal. + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] + [<System.Diagnostics.CodeAnalysis.NotNullWhen(true)>] + + + + + + The object to compare with the current instance. + Returns a value that indicates whether the current instance and a specified object are equal. + + if is a object and its property is equal to that of the current instance. The comparison is ordinal and case-sensitive. + To be added. + + + + + + + + + + Method + + M:System.IEquatable`1.Equals(`0) + + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + The object to compare with the current instance. + Returns a value that indicates whether two instances are equal. + + if the property of is equal to that of the current instance. The comparison is ordinal and case-sensitive. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.HashAlgorithmName + + + + + + The OID of the hash algorithm. + Converts the specified OID to a hash algorithm name. + The hash algorithm name identified by the OID. + To be added. + + is . + + does not represent a known hash algorithm. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + + Returns the hash code for the current instance. + The hash code for the current instance, or 0 if no value was supplied to the constructor. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.HashAlgorithmName + + + Gets a hash algorithm name that represents "MD5". + A hash algorithm name that represents "MD5". + Due to collision problems with MD5, Microsoft recommends a security model based on SHA256 or better. + + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.String + + + Gets the underlying string representation of the algorithm name. + The string representation of the algorithm name, or if no hash algorithm is available. + + + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + The first object to compare. + The second object to compare. + Determines whether two specified objects are equal. + + if both and have the same value; otherwise, . + + method defines the operation of the equality operator for values. + + ]]> + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + The first object to compare. + The second object to compare. + Determines whether two specified objects are not equal. + + if both and do not have the same value; otherwise, . + + method defines the operation of the inequality operator for values. + + ]]> + + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.HashAlgorithmName + + + Gets a hash algorithm name that represents "SHA1". + A hash algorithm name that represents "SHA1". + Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better. + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.HashAlgorithmName + + + Gets a hash algorithm name that represents "SHA256". + A hash algorithm name that represents "SHA256". + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Security.Cryptography.HashAlgorithmName + + + Gets a representing "SHA3-256" + To be added. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Security.Cryptography.HashAlgorithmName + + + Gets a representing "SHA3-384" + To be added. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Primitives + + + netstandard + + + System.Security.Cryptography.HashAlgorithmName + + + Gets a representing "SHA3-512" + To be added. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.HashAlgorithmName + + + Gets a hash algorithm name that represents "SHA384". + A hash algorithm name that represents "SHA384". + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.HashAlgorithmName + + + Gets a hash algorithm name that represents "SHA512". + A hash algorithm name that represents "SHA512". + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.String + + + + Returns the string representation of the current instance. + The string representation of the current instance. + + method returns the property, if it has been assigned. Otherwise, it returns . + + ]]> + + + + + + + + + + + Method + + System.Security.Cryptography.Primitives + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Boolean + + + + + + + The OID of the hash algorithm. + When this method returns , the hash algorithm. When this method returns , contains default. + Tries to convert the specified OID to a hash algorithm name. + + if the OID was successfully mapped to a hash algorithm; otherwise . + To be added. + + is . + + + + diff --git a/xml/System.Security.Cryptography/RSA.xml b/xml/System.Security.Cryptography/RSA.xml index a7503e88775..cc4daff270e 100644 --- a/xml/System.Security.Cryptography/RSA.xml +++ b/xml/System.Security.Cryptography/RSA.xml @@ -1,3975 +1,3977 @@ - - - - - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.Security.Cryptography.AsymmetricAlgorithm - - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Runtime.InteropServices.ComVisible(true)] - [<System.Runtime.InteropServices.ComVisible(true)>] - - - - Represents the base class from which all implementations of the algorithm inherit. - - - - Cryptographic Services - - - - - - - - - - - - - Constructor - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - Initializes a new instance of the class. - - . You cannot create an instance of an abstract class. - - ]]> - - Cryptographic Services - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - - - Allows specific implementations of to be instantiated. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.RSA - - - - Creates an instance of the default implementation of the algorithm. - A new instance of the default implementation of . - To be added. - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 4.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - - System.Security.Cryptography.RSA - - - - - - The key size, in bits. - Creates a new ephemeral RSA key with the specified key size. - A new ephemeral RSA key with the specified key size. - To be added. - - is not supported by the default implementation. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 4.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - - System.Security.Cryptography.RSA - - - - - - The parameters for the algorithm. - Creates a new ephemeral RSA key with the specified RSA key parameters. - A new ephemeral RSA key. - To be added. - - does not represent a valid RSA key. - - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] - [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>] - - - [System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.RSA - - - - - - The name of the implementation of to use. - Creates an instance of the specified implementation of . - A new instance of the specified implementation of . - To be added. - Cryptographic Services - - - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - The data to decrypt. - The padding mode. - When overridden in a derived class, decrypts the input data using the specified padding mode. - The decrypted data. - To be added. - - or is . - A derived class must override this method. - - is unknown, or not supported by this implementation. - --or- - -The length of is not equal to the number of bytes for . - --or- - -This instance represents only a public key. - --or- - -The decryption operation failed. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - The data to decrypt. - The padding mode. - Decrypts the input data using the specified padding mode. - The decrypted data. - To be added. - - is . - - is unknown, or not supported by this implementation. - --or- - -The decryption operation failed. - This implementation has not implemented one of or - . - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - The data to decrypt. - The buffer to receive the decrypted data. - The padding mode. - Decrypts the input data using the specified padding mode. - The total number of bytes written to . - To be added. - - is . - The buffer in is too small to hold the decrypted data. - - is unknown, or not supported by this implementation. - --or- - -The decryption operation failed. - This implementation has not implemented one of or - . - - - - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>] - - - [System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - System.Byte[] - - - - - - The cipher text to be decrypted. - When overridden in a derived class, decrypts the input data using the private key. - The resulting decryption of the parameter in plain text. - - , also threw a exception. - - ]]> - - This method call is not supported. This exception is thrown starting with the .NET Framework 4.6. - - Cryptographic Services - - - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - The data to encrypt. - The padding mode. - When overridden in a derived class, encrypts the input data using the specified padding mode. - The encrypted data. - To be added. - - or is . - A derived class must override this method. - - is unknown, or not supported by this implementation. - --or- - -The length of is too long for the combination of and the selected padding. - --or- - -The encryption operation failed. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - The data to encrypt. - The padding mode. - Encrypts the input data using the specified padding mode. - The encrypted data. - To be added. - - is . - - is unknown, or not supported by this implementation. - --or- - -The length of data is too long for the combination of and the selected padding. - --or- - -The encryption operation failed. - This implementation has not implemented one of or - . - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - The data to encrypt. - The buffer to receive the encrypted data. - The padding mode. - Encrypts the input data using the specified padding mode. - The total number of bytes written to . - To be added. - - is . - The buffer in is too small to hold the encrypted data. - - is unknown, or not supported by this implementation. - --or- - -The length of data is too long for the combination of and the selected padding. - --or- - -The encryption operation failed. - This implementation has not implemented one of or - . - - - - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>] - - - [System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - System.Byte[] - - - - - - The plain text to be encrypted. - When overridden in a derived class, encrypts the input data using the public key. - The resulting encryption of the parameter as cipher text. - - , also threw a exception. - - ]]> - - This method call is not supported. This exception is thrown starting with the .NET Framework 4.6. - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.RSAParameters - - - - - - - to include private parameters; otherwise, . - When overridden in a derived class, exports the . - The parameters for . - To be added. - The parameters could not be exported. - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - Exports the current key in the PKCS#1 RSAPrivateKey format. - A byte array containing the PKCS#1 RSAPrivateKey representation of this key. - To be added. - The key could not be exported. - - - - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.String - - - - Exports the current key in the PKCS#1 RSAPrivateKey format, PEM encoded. - A string containing the PEM-encoded PKCS#1 RSAPrivateKey. - - - - The key could not be exported. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - Exports the public-key portion of the current key in the PKCS#1 RSAPublicKey format. - A byte array containing the PKCS#1 RSAPublicKey representation of this key. - To be added. - - - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.String - - - - Exports the public-key portion of the current key in the PKCS#1 RSAPublicKey format, PEM encoded. - A string containing the PEM-encoded PKCS#1 RSAPublicKey. - - - - The key could not be exported. - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The XML string containing key information. - Initializes an object from the key information from an XML string. - - initializes an RSA object using key information in an XML string that was generated using the method. The method accepts either an XML string containing a public key or an XML string containing a public and private key. - - Use the method to conveniently initialize key information. - -> [!CAUTION] -> Persisting an XML string containing a private key to an insecure location is a security threat. The security of your application can be compromised if a malicious third party can access your private key. To safely persist a private key, use a secure key container. For more information about persisting private keys in a key container, see [How to: Store Asymmetric Keys in a Key Container](/dotnet/standard/security/how-to-store-asymmetric-keys-in-a-key-container). - - ]]> - - The parameter is . - The format of the parameter is not valid. - .NET Core and .NET 5+ only: In all cases. - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Int32 - - - - To be added. - To be added. - To be added. - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - - - Computes the hash value of binary data. - - - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - The binary stream to hash. - The hash algorithm. - When overridden in a derived class, computes the hash value of a specified binary stream by using a specified hashing algorithm. - The hashed data. - To be added. - A derived class must override this method. - - - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - - The data to be hashed. - The index of the first byte in that is to be hashed. - The number of bytes to hash. - The algorithm to use in hash the data. - When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. - The hashed data. - To be added. - A derived class must override this method. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - The bytes to use as a password when decrypting the key material. - The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. - - - - The password is incorrect. - --or- - -The contents of indicate the Key Derivation Function (KDF) to apply is the legacy PKCS#12 KDF, which requires -based passwords. - --or- - -The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - The password to use for decrypting the key material. - The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. - - - - The password is incorrect. - --or- - -The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - The PEM text of the encrypted key to import. - The bytes to use as a password when decrypting the key material. - Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object. - - - - - does not contain a PEM-encoded key with a recognized label. - --or- - - contains multiple PEM-encoded keys with a recognized label. - - -The password is incorrect. - --or- - -The base-64 decoded contents of the PEM text from do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The base-64 decoded contents of the PEM text from indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The base-64 decoded contents of the PEM text from represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - The PEM text of the encrypted key to import. - The password to use for decrypting the key material. - Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object. - - - - - does not contain a PEM-encoded key with a recognized label. - --or- - - contains multiple PEM-encoded keys with a recognized label. - - -The password is incorrect. - --or- - -The base-64 decoded contents of the PEM text from do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. - --or- - -The base-64 decoded contents of the PEM text from indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The base-64 decoded contents of the PEM text from represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - The PEM text of the key to import. - Imports an RFC 7468 PEM-encoded key, replacing the keys for this object. - - - - - does not contain a PEM-encoded key with a recognized label. - --or- - - contains multiple PEM-encoded keys with a recognized label. - --or- - - contains an encrypted PEM-encoded key. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The parameters for . - When overridden in a derived class, imports the specified . - To be added. - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object. - - - - The contents of do not represent an ASN.1-BER-encoded PKCS#8 PrivateKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - The bytes of a PKCS#1 RSAPrivateKey structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public/private keypair from a PKCS#1 RSAPrivateKey structure after decryption, replacing the keys for this object. - - - - The contents of do not represent an ASN.1-BER-encoded PKCS#1 RSAPrivateKey structure. - --or- - -The key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - The bytes of a PKCS#1 RSAPublicKey structure in the ASN.1-BER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public key from a PKCS#1 RSAPublicKey structure after decryption, replacing the keys for this object. - - - - The contents of do not represent an ASN.1-BER-encoded PKCS#1 RSAPublicKey structure. - --or- - -The key import failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding. - When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. - Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object. - - - - The contents of do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure. - --or- - -The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. - --or- - -The contents of represent the key in a format that is not supported. - --or- - -The algorithm-specific key import failed. - - - - - - - - - - - - Property - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.String - - - Gets the name of the key exchange algorithm available with this implementation of . - Returns "RSA". - To be added. - - - - - - - - - - Property - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.String - - - Gets the name of the signature algorithm available with this implementation of . - Returns "RSA". - To be added. - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - - - Computes the hash value of the specified data and signs it. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - The input data to hash and sign. - The hash algorithm to use to create the hash value. - The padding mode. - Computes the hash value of the specified byte array using the specified hash algorithm and padding mode, and signs the resulting hash value. - The RSA signature for the specified data. - To be added. - - is . - - -or- - - is . - - . is or . - - is unknown, or not supported by this implementation. - --or- - -This instance represents only a public key. - --or- - -An error occurred creating the signature. - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - The input stream to hash and sign. - The hash algorithm to use to create the hash value. - The padding mode. - Computes the hash value of the specified stream using the specified hash algorithm and padding mode, and signs the resulting hash value. - The RSA signature for the specified data. - To be added. - - is . - - -or- - - is . - - . is or . - - is unknown, or not supported by this implementation. - --or- - -This instance represents only a public key. - --or- - -An error occurred creating the signature. - - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - - The input data to hash and sign. - The hash algorithm to use to create the hash value. - The padding mode. - Computes the hash value of the specified data and signs it. - The RSA signature for the specified data. - To be added. - - or 's is . - - 's is an empty string. - - is unknown, or not supported by this implementation. - --or- - -This instance represents only a public key. - --or- - -An error occurred creating the signature. - This implementation has not implemented one of , , - or . - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - The input data to hash and sign. - The buffer to receive the RSA signature. - The hash algorithm to use to create the hash value. - The padding mode. - Computes the hash of the provided data with the specified algorithm and sign the hash with the current key, writing the signature into a provided buffer. - The total number of bytes written to . - To be added. - - or 's is . - - 's is an empty string. - --or- - -The buffer in is too small to hold the signature. - - - is unknown, or not supported by this implementation. - --or- - -This instance represents only a public key. - --or- - -An error occurred creating the signature. - This implementation has not implemented one of , , - or . - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - - - The input data to hash and sign. - The offset into the array at which to begin using data. - The number of bytes in the array to use as data. - The hash algorithm to use to create the hash value. - The padding mode. - Computes the hash value of a portion of the specified byte array using the specified hash algorithm and padding mode, and signs the resulting hash value. - The RSA signature for the specified data. - To be added. - - is . - - -or- - - is . - - . is or . - - is less than zero. - - -or- - - is less than zero. - - -or- - - + - 1 results in an index that is beyond the upper bound of . - - is unknown, or not supported by this implementation. - --or- - -This instance represents only a public key. - --or- - -An error occurred creating the signature. - - - - - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - The hash value of the data to be signed. - The hash algorithm used to create the hash value of the data. - The padding. - When overridden in a derived class, computes the signature for the specified hash value using the specified padding. - The RSA signature for the specified hash value. - To be added. - A derived class must override this method. - - or is . - - . is or . - - is unknown, or not supported by this implementation. - --or- - -This instance represents only a public key. - --or- - -An error occurred creating the signature. - - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - - The hash value of the data to be signed. - The hash algorithm used to create the hash of . - The padding mode. - Computes the signature for the specified hash value using the specified padding. - The RSA signature for the specified hash value. - To be added. - - or 's is . - - 's is an empty string. - - is unknown, or not supported by this implementation. - --or- - -This instance represents only a public key. - --or- - -An error occurred creating the signature. - This implementation has not implemented one of - or . - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Int32 - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - The hash value of the data to be signed. - The buffer to receive the RSA signature. - The hash algorithm used to create the hash of . - The padding mode. - Signs the hash with the current key, writing the signature into a provided buffer. - The total number of bytes written to . - To be added. - - or 's is . - - 's is an empty string. - --or- - -The buffer in is too small to hold the signature. - - - is unknown, or not supported by this implementation. - --or- - -This instance represents only a public key. - --or- - -An error occurred creating the signature. - This implementation has not implemented one of - or . - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.String - - - - - - - to include a public and private RSA key; to include only the public key. - Creates and returns an XML string containing the key of the current object. - An XML string containing the key of the current object. - - method creates an XML string that contains either the public and private key of the current object or contains only the public key of the current object. - - Use the method whenever you need to conveniently persist RSA key information. To initialize an object with the key in an XML string, use the method. - -> [!CAUTION] -> Persisting an XML string containing a private key to an insecure location is a security threat. The security of your application can be compromised if a malicious third party can access your private key. To safely persist a private key, use a secure key container. For more information about persisting private keys in a key container, see [How to: Store Asymmetric Keys in a Key Container](/dotnet/standard/security/how-to-store-asymmetric-keys-in-a-key-container). - - When you pass `true` to the method, the resulting XML string takes the following form: - -``` - - … - … -

…

- … - … - … - … - … -
-``` - - When you pass `false` to the method, the resulting XML string takes the following form: - -``` - - … - … - -``` - - ]]>
-
- .NET Core and .NET 5+ only: In all cases. - Cryptographic Services -
-
- - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - The data to decrypt. - The buffer to receive the decrypted data. - The padding mode. - When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. - Attempts to decrypt the input data using the specified padding mode, writing the result into a provided buffer. - - if is long enough to receive the decrypted data; otherwise, . - - and copies the result to `destination`. -Derived types should override this method to avoid the intermediate array creation. - -The RSA decryption algorithm will always produce an output smaller than the input, therefore this method will never return `false` when `destination.Length >= data.Length`. - - ]]> - - - is . - - is unknown, or not supported by this implementation. - --or- - -The length of is not equal to the number of bytes for . - --or- - -This instance represents only a public key. - --or- - -The decryption operation failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - The data to encrypt. - The buffer to receive the encrypted data. - The padding mode. - When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. - Attempts to encrypt the input data with a specified padding mode into a provided buffer. - - if is long enough to receive the encrypted data; otherwise, . - - and copies the result to `destination`. -Derived types should override this method to avoid the intermediate array creation. - -The RSA encryption algorithm will always produce an output equal to the number of bytes required for bits. - - ]]> - - - is . - - is unknown, or not supported by this implementation. - --or- - -The length of is too long for the combination of and the selected padding. - --or- - -The encryption operation failed. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - The bytes to use as a password when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password. - - if is big enough to receive the output; otherwise, . - - - - The key could not be exported. - --or- - - indicates that should be used, which requires -based passwords. - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - The password to use when encrypting the key material. - The password-based encryption (PBE) parameters to use when encrypting the key material. - The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password. - - if is big enough to receive the output; otherwise, . - - - - The key could not be exported. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - The byte span to receive the PKCS#8 PrivateKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. - - if is big enough to receive the output; otherwise, . - To be added. - The key could not be exported. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - The byte span to receive the PKCS#1 RSAPrivateKey data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PKCS#1 RSAPrivateKey format into a provided buffer. - - if is big enough to receive the output; otherwise, . - To be added. - The key could not be exported. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - The character span to receive the PEM-encoded PKCS#1 RSAPrivateKey data. - When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PEM-encoded PKCS#1 RSAPrivateKey format into a provided buffer. - - if is big enough to receive the output; otherwise, . - - - - The key could not be exported. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - The byte span to receive the PKCS#1 RSAPublicKey data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PKCS#1 RSAPublicKey format into a provided buffer. - - if is big enough to receive the output; otherwise, . - To be added. - The key could not be exported. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - The character span to receive the PEM-encoded PKCS#1 RSAPublicKey data. - When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. - Attempts to export the current key in the PEM-encoded PKCS#1 RSAPublicKey format into a provided buffer. - - if is big enough to receive the output; otherwise, . - - - - The key could not be exported. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - The byte span to receive the X.509 SubjectPublicKeyInfo data. - When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. - Attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer. - - if is big enough to receive the output; otherwise, . - To be added. - The key could not be exported. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - The data to be hashed. - The buffer to receive the hash value. - The algorithm to use in hash the data. - When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. - Attempts to compute the hash of the provided data by using the specified algorithm, writing the results into a provided buffer. - - if is long enough to receive the hash value; otherwise, . - - and copies the result to `destination`. -Derived types should override this method to avoid the intermediate array creation. - - ]]> - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - The input data to hash and sign. - The buffer to receive the RSA signature. - The hash algorithm used to create the hash value of the data. - The padding mode. - When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. - Attempts to hash the provided data with the specified algorithm and sign the hash with the current key, writing the signature into a provided buffer. - - if is long enough to receive the RSA signature; otherwise, . - - bits. - - ]]> - - - is . - - . is or . - This instance represents only a public key. - --or- - -An error occurred creating the signature. - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - The hash value of the data to be signed. - The buffer to receive the RSA signature. - The hash algorithm used to create the hash value of the data. - The padding. - When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. - Attempts to sign the hash with the current key, writing the signature into a provided buffer. - - if is long enough to receive the RSA signature; otherwise, . - - and copies the result to `destination`. -Derived types should override this method to avoid the intermediate array creation. - -The RSA signature algorithm will always produce an output equal to the number of bytes required for bits. - - ]]> - - - is . - - . is or . - - is unknown, or not supported by this implementation. - --or- - -This instance represents only a public key. - --or- - -An error occurred creating the signature. - - - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - - - Verifies that a digital signature is valid. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - - - The signed data. - The signature data to be verified. - The hash algorithm used to create the hash value of the data. - The padding mode. - Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and padding, and comparing it to the provided signature. - - if the signature is valid; otherwise, . - To be added. - - is . - - -or- - - is . - - -or- - - is . - - . is or . - - is unknown, or not supported by this implementation. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - - - The signed data. - The signature data to be verified. - The hash algorithm used to create the hash value of the data. - The padding mode. - Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and padding, and comparing it to the provided signature. - - if the signature is valid; otherwise, . - To be added. - - is . - - -or- - - is . - - -or- - - is . - - . is or . - - is unknown, or not supported by this implementation. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - The signed data. - The signature data to be verified. - The hash algorithm used to create the hash value of the data. - The padding mode. - Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and padding, and comparing it to the provided signature. - - if the signature is valid; otherwise, . - To be added. - - . is or . - - is unknown, or not supported by this implementation. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - - - - - The signed data. - The starting index at which to compute the hash. - The number of bytes to hash. - The signature data to be verified. - The hash algorithm used to create the hash value of the data. - The padding mode. - 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 padding, and comparing it to the provided signature. - - if the signature is valid; otherwise, . - To be added. - - is . - - -or- - - is . - - -or- - - is . - - . is or . - - is less than zero. - - -or- - - is less than zero. - - -or- - - + - 1 results in an index that is beyond the upper bound of . - - is unknown, or not supported by this implementation. - - - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - - - The hash value of the signed data. - The signature data to be verified. - The hash algorithm used to create the hash value. - The padding mode. - Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value. - - if the signature is valid; otherwise, . - To be added. - A derived class must override this method. - - or is . - - . is or . - - is unknown, or not supported by this implementation. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Boolean - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - The hash value of the signed data. - The signature data to be verified. - The hash algorithm used to create the hash value. - The padding mode. - Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value. - - if the signature is valid; otherwise, . - - . -Derived types should override this method to avoid the intermediate array creation. - - ]]> - - - or is . - - . is or . - - is unknown, or not supported by this implementation. - - -
-
+ + + + + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.Security.Cryptography.AsymmetricAlgorithm + + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Runtime.InteropServices.ComVisible(true)] + [<System.Runtime.InteropServices.ComVisible(true)>] + + + + Represents the base class from which all implementations of the algorithm inherit. + + + + Cryptographic Services + + + + + + + + + + + + + Constructor + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + Initializes a new instance of the class. + + . You cannot create an instance of an abstract class. + + ]]> + + Cryptographic Services + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + + + Allows specific implementations of to be instantiated. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.RSA + + + + Creates an instance of the default implementation of the algorithm. + A new instance of the default implementation of . + To be added. + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 4.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + + System.Security.Cryptography.RSA + + + + + + The key size, in bits. + Creates a new ephemeral RSA key with the specified key size. + A new ephemeral RSA key with the specified key size. + To be added. + + is not supported by the default implementation. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 4.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + + System.Security.Cryptography.RSA + + + + + + The parameters for the algorithm. + Creates a new ephemeral RSA key with the specified RSA key parameters. + A new ephemeral RSA key. + To be added. + + does not represent a valid RSA key. + + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] + [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>] + + + [System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.RSA + + + + + + The name of the implementation of to use. + Creates an instance of the specified implementation of . + A new instance of the specified implementation of . + To be added. + Cryptographic Services + + + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + The data to decrypt. + The padding mode. + When overridden in a derived class, decrypts the input data using the specified padding mode. + The decrypted data. + To be added. + + or is . + A derived class must override this method. + + is unknown, or not supported by this implementation. + +-or- + +The length of is not equal to the number of bytes for . + +-or- + +This instance represents only a public key. + +-or- + +The decryption operation failed. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The data to decrypt. + The padding mode. + Decrypts the input data using the specified padding mode. + The decrypted data. + To be added. + + is . + + is unknown, or not supported by this implementation. + +-or- + +The decryption operation failed. + This implementation has not implemented one of or + . + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + The data to decrypt. + The buffer to receive the decrypted data. + The padding mode. + Decrypts the input data using the specified padding mode. + The total number of bytes written to . + To be added. + + is . + The buffer in is too small to hold the decrypted data. + + is unknown, or not supported by this implementation. + +-or- + +The decryption operation failed. + This implementation has not implemented one of or + . + + + + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>] + + + [System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + System.Byte[] + + + + + + The cipher text to be decrypted. + When overridden in a derived class, decrypts the input data using the private key. + The resulting decryption of the parameter in plain text. + + , also threw a exception. + + ]]> + + This method call is not supported. This exception is thrown starting with the .NET Framework 4.6. + + Cryptographic Services + + + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + The data to encrypt. + The padding mode. + When overridden in a derived class, encrypts the input data using the specified padding mode. + The encrypted data. + To be added. + + or is . + A derived class must override this method. + + is unknown, or not supported by this implementation. + +-or- + +The length of is too long for the combination of and the selected padding. + +-or- + +The encryption operation failed. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The data to encrypt. + The padding mode. + Encrypts the input data using the specified padding mode. + The encrypted data. + To be added. + + is . + + is unknown, or not supported by this implementation. + +-or- + +The length of data is too long for the combination of and the selected padding. + +-or- + +The encryption operation failed. + This implementation has not implemented one of or + . + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + The data to encrypt. + The buffer to receive the encrypted data. + The padding mode. + Encrypts the input data using the specified padding mode. + The total number of bytes written to . + To be added. + + is . + The buffer in is too small to hold the encrypted data. + + is unknown, or not supported by this implementation. + +-or- + +The length of data is too long for the combination of and the selected padding. + +-or- + +The encryption operation failed. + This implementation has not implemented one of or + . + + + + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>] + + + [System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + System.Byte[] + + + + + + The plain text to be encrypted. + When overridden in a derived class, encrypts the input data using the public key. + The resulting encryption of the parameter as cipher text. + + , also threw a exception. + + ]]> + + This method call is not supported. This exception is thrown starting with the .NET Framework 4.6. + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.RSAParameters + + + + + + + to include private parameters; otherwise, . + When overridden in a derived class, exports the . + The parameters for . + To be added. + The parameters could not be exported. + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + Exports the current key in the PKCS#1 RSAPrivateKey format. + A byte array containing the PKCS#1 RSAPrivateKey representation of this key. + To be added. + The key could not be exported. + + + + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.String + + + + Exports the current key in the PKCS#1 RSAPrivateKey format, PEM encoded. + A string containing the PEM-encoded PKCS#1 RSAPrivateKey. + + + + The key could not be exported. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + Exports the public-key portion of the current key in the PKCS#1 RSAPublicKey format. + A byte array containing the PKCS#1 RSAPublicKey representation of this key. + To be added. + + + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.String + + + + Exports the public-key portion of the current key in the PKCS#1 RSAPublicKey format, PEM encoded. + A string containing the PEM-encoded PKCS#1 RSAPublicKey. + + + + The key could not be exported. + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The XML string containing key information. + Initializes an object from the key information from an XML string. + + initializes an RSA object using key information in an XML string that was generated using the method. The method accepts either an XML string containing a public key or an XML string containing a public and private key. + + Use the method to conveniently initialize key information. + +> [!CAUTION] +> Persisting an XML string containing a private key to an insecure location is a security threat. The security of your application can be compromised if a malicious third party can access your private key. To safely persist a private key, use a secure key container. For more information about persisting private keys in a key container, see [How to: Store Asymmetric Keys in a Key Container](/dotnet/standard/security/how-to-store-asymmetric-keys-in-a-key-container). + + ]]> + + The parameter is . + The format of the parameter is not valid. + .NET Core and .NET 5+ only: In all cases. + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Int32 + + + + Gets the maximum number of bytes an RSA operation can produce. + The maximum number of bytes an RSA operation can produce. + The maximum output size is defined by the RSA modulus, or key size. The key size, in bytes, is the maximum output size. If the key size is not an even number of bytes, then it is rounded up to the nearest number of whole bytes for purposes of determining the maximum output size. + + returned a value that is not a possible RSA key size. + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + + + Computes the hash value of binary data. + + + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + The binary stream to hash. + The hash algorithm. + When overridden in a derived class, computes the hash value of a specified binary stream by using a specified hashing algorithm. + The hashed data. + To be added. + A derived class must override this method. + + + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + + The data to be hashed. + The index of the first byte in that is to be hashed. + The number of bytes to hash. + The algorithm to use in hash the data. + When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. + The hashed data. + To be added. + A derived class must override this method. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The bytes to use as a password when decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. + + + + The password is incorrect. + +-or- + +The contents of indicate the Key Derivation Function (KDF) to apply is the legacy PKCS#12 KDF, which requires -based passwords. + +-or- + +The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The password to use for decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. + + + + The password is incorrect. + +-or- + +The contents of do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + The PEM text of the encrypted key to import. + The bytes to use as a password when decrypting the key material. + Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object. + + + + + does not contain a PEM-encoded key with a recognized label. + +-or- + + contains multiple PEM-encoded keys with a recognized label. + + +The password is incorrect. + +-or- + +The base-64 decoded contents of the PEM text from do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The base-64 decoded contents of the PEM text from indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The base-64 decoded contents of the PEM text from represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + The PEM text of the encrypted key to import. + The password to use for decrypting the key material. + Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object. + + + + + does not contain a PEM-encoded key with a recognized label. + +-or- + + contains multiple PEM-encoded keys with a recognized label. + + +The password is incorrect. + +-or- + +The base-64 decoded contents of the PEM text from do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure. + +-or- + +The base-64 decoded contents of the PEM text from indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The base-64 decoded contents of the PEM text from represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + The PEM text of the key to import. + Imports an RFC 7468 PEM-encoded key, replacing the keys for this object. + + + + + does not contain a PEM-encoded key with a recognized label. + +-or- + + contains multiple PEM-encoded keys with a recognized label. + +-or- + + contains an encrypted PEM-encoded key. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The parameters for . + When overridden in a derived class, imports the specified . + To be added. + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object. + + + + The contents of do not represent an ASN.1-BER-encoded PKCS#8 PrivateKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + The bytes of a PKCS#1 RSAPrivateKey structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#1 RSAPrivateKey structure after decryption, replacing the keys for this object. + + + + The contents of do not represent an ASN.1-BER-encoded PKCS#1 RSAPrivateKey structure. + +-or- + +The key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + The bytes of a PKCS#1 RSAPublicKey structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public key from a PKCS#1 RSAPublicKey structure after decryption, replacing the keys for this object. + + + + The contents of do not represent an ASN.1-BER-encoded PKCS#1 RSAPublicKey structure. + +-or- + +The key import failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding. + When this method returns, contains a value that indicates the number of bytes read from . This parameter is treated as uninitialized. + Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object. + + + + The contents of do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure. + +-or- + +The contents of indicate the key is for an algorithm other than the algorithm represented by this instance. + +-or- + +The contents of represent the key in a format that is not supported. + +-or- + +The algorithm-specific key import failed. + + + + + + + + + + + + Property + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.String + + + Gets the name of the key exchange algorithm available with this implementation of . + Returns "RSA". + To be added. + + + + + + + + + + Property + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.String + + + Gets the name of the signature algorithm available with this implementation of . + Returns "RSA". + To be added. + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + + + Computes the hash value of the specified data and signs it. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + The input data to hash and sign. + The hash algorithm to use to create the hash value. + The padding mode. + Computes the hash value of the specified byte array using the specified hash algorithm and padding mode, and signs the resulting hash value. + The RSA signature for the specified data. + To be added. + + is . + + -or- + + is . + + . is or . + + is unknown, or not supported by this implementation. + +-or- + +This instance represents only a public key. + +-or- + +An error occurred creating the signature. + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + The input stream to hash and sign. + The hash algorithm to use to create the hash value. + The padding mode. + Computes the hash value of the specified stream using the specified hash algorithm and padding mode, and signs the resulting hash value. + The RSA signature for the specified data. + To be added. + + is . + + -or- + + is . + + . is or . + + is unknown, or not supported by this implementation. + +-or- + +This instance represents only a public key. + +-or- + +An error occurred creating the signature. + + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + + The input data to hash and sign. + The hash algorithm to use to create the hash value. + The padding mode. + Computes the hash value of the specified data and signs it. + The RSA signature for the specified data. + To be added. + + or 's is . + + 's is an empty string. + + is unknown, or not supported by this implementation. + +-or- + +This instance represents only a public key. + +-or- + +An error occurred creating the signature. + This implementation has not implemented one of , , + or . + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + The input data to hash and sign. + The buffer to receive the RSA signature. + The hash algorithm to use to create the hash value. + The padding mode. + Computes the hash of the provided data with the specified algorithm and sign the hash with the current key, writing the signature into a provided buffer. + The total number of bytes written to . + To be added. + + or 's is . + + 's is an empty string. + +-or- + +The buffer in is too small to hold the signature. + + + is unknown, or not supported by this implementation. + +-or- + +This instance represents only a public key. + +-or- + +An error occurred creating the signature. + This implementation has not implemented one of , , + or . + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + + + The input data to hash and sign. + The offset into the array at which to begin using data. + The number of bytes in the array to use as data. + The hash algorithm to use to create the hash value. + The padding mode. + Computes the hash value of a portion of the specified byte array using the specified hash algorithm and padding mode, and signs the resulting hash value. + The RSA signature for the specified data. + To be added. + + is . + + -or- + + is . + + . is or . + + is less than zero. + + -or- + + is less than zero. + + -or- + + + - 1 results in an index that is beyond the upper bound of . + + is unknown, or not supported by this implementation. + +-or- + +This instance represents only a public key. + +-or- + +An error occurred creating the signature. + + + + + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + The hash value of the data to be signed. + The hash algorithm used to create the hash value of the data. + The padding. + When overridden in a derived class, computes the signature for the specified hash value using the specified padding. + The RSA signature for the specified hash value. + To be added. + A derived class must override this method. + + or is . + + . is or . + + is unknown, or not supported by this implementation. + +-or- + +This instance represents only a public key. + +-or- + +An error occurred creating the signature. + + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + + The hash value of the data to be signed. + The hash algorithm used to create the hash of . + The padding mode. + Computes the signature for the specified hash value using the specified padding. + The RSA signature for the specified hash value. + To be added. + + or 's is . + + 's is an empty string. + + is unknown, or not supported by this implementation. + +-or- + +This instance represents only a public key. + +-or- + +An error occurred creating the signature. + This implementation has not implemented one of + or . + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Int32 + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + The hash value of the data to be signed. + The buffer to receive the RSA signature. + The hash algorithm used to create the hash of . + The padding mode. + Signs the hash with the current key, writing the signature into a provided buffer. + The total number of bytes written to . + To be added. + + or 's is . + + 's is an empty string. + +-or- + +The buffer in is too small to hold the signature. + + + is unknown, or not supported by this implementation. + +-or- + +This instance represents only a public key. + +-or- + +An error occurred creating the signature. + This implementation has not implemented one of + or . + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.String + + + + + + + to include a public and private RSA key; to include only the public key. + Creates and returns an XML string containing the key of the current object. + An XML string containing the key of the current object. + + method creates an XML string that contains either the public and private key of the current object or contains only the public key of the current object. + + Use the method whenever you need to conveniently persist RSA key information. To initialize an object with the key in an XML string, use the method. + +> [!CAUTION] +> Persisting an XML string containing a private key to an insecure location is a security threat. The security of your application can be compromised if a malicious third party can access your private key. To safely persist a private key, use a secure key container. For more information about persisting private keys in a key container, see [How to: Store Asymmetric Keys in a Key Container](/dotnet/standard/security/how-to-store-asymmetric-keys-in-a-key-container). + + When you pass `true` to the method, the resulting XML string takes the following form: + +``` + + … + … +

…

+ … + … + … + … + … +
+``` + + When you pass `false` to the method, the resulting XML string takes the following form: + +``` + + … + … + +``` + + ]]>
+
+ .NET Core and .NET 5+ only: In all cases. + Cryptographic Services +
+
+ + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The data to decrypt. + The buffer to receive the decrypted data. + The padding mode. + When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. + Attempts to decrypt the input data using the specified padding mode, writing the result into a provided buffer. + + if is long enough to receive the decrypted data; otherwise, . + + and copies the result to `destination`. +Derived types should override this method to avoid the intermediate array creation. + +The RSA decryption algorithm will always produce an output smaller than the input, therefore this method will never return `false` when `destination.Length >= data.Length`. + + ]]> + + + is . + + is unknown, or not supported by this implementation. + +-or- + +The length of is not equal to the number of bytes for . + +-or- + +This instance represents only a public key. + +-or- + +The decryption operation failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The data to encrypt. + The buffer to receive the encrypted data. + The padding mode. + When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. + Attempts to encrypt the input data with a specified padding mode into a provided buffer. + + if is long enough to receive the encrypted data; otherwise, . + + and copies the result to `destination`. +Derived types should override this method to avoid the intermediate array creation. + +The RSA encryption algorithm will always produce an output equal to the number of bytes required for bits. + + ]]> + + + is . + + is unknown, or not supported by this implementation. + +-or- + +The length of is too long for the combination of and the selected padding. + +-or- + +The encryption operation failed. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password. + + if is big enough to receive the output; otherwise, . + + + + The key could not be exported. + +-or- + + indicates that should be used, which requires -based passwords. + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password. + + if is big enough to receive the output; otherwise, . + + + + The key could not be exported. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The byte span to receive the PKCS#8 PrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. + + if is big enough to receive the output; otherwise, . + To be added. + The key could not be exported. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The byte span to receive the PKCS#1 RSAPrivateKey data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#1 RSAPrivateKey format into a provided buffer. + + if is big enough to receive the output; otherwise, . + To be added. + The key could not be exported. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The character span to receive the PEM-encoded PKCS#1 RSAPrivateKey data. + When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PEM-encoded PKCS#1 RSAPrivateKey format into a provided buffer. + + if is big enough to receive the output; otherwise, . + + + + The key could not be exported. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The byte span to receive the PKCS#1 RSAPublicKey data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#1 RSAPublicKey format into a provided buffer. + + if is big enough to receive the output; otherwise, . + To be added. + The key could not be exported. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The character span to receive the PEM-encoded PKCS#1 RSAPublicKey data. + When this method returns, contains a value that indicates the number of characters written to . This parameter is treated as uninitialized. + Attempts to export the current key in the PEM-encoded PKCS#1 RSAPublicKey format into a provided buffer. + + if is big enough to receive the output; otherwise, . + + + + The key could not be exported. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + The byte span to receive the X.509 SubjectPublicKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to . This parameter is treated as uninitialized. + Attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer. + + if is big enough to receive the output; otherwise, . + To be added. + The key could not be exported. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + The data to be hashed. + The buffer to receive the hash value. + The algorithm to use in hash the data. + When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. + Attempts to compute the hash of the provided data by using the specified algorithm, writing the results into a provided buffer. + + if is long enough to receive the hash value; otherwise, . + + and copies the result to `destination`. +Derived types should override this method to avoid the intermediate array creation. + + ]]> + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The input data to hash and sign. + The buffer to receive the RSA signature. + The hash algorithm used to create the hash value of the data. + The padding mode. + When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. + Attempts to hash the provided data with the specified algorithm and sign the hash with the current key, writing the signature into a provided buffer. + + if is long enough to receive the RSA signature; otherwise, . + + bits. + + ]]> + + + is . + + . is or . + This instance represents only a public key. + +-or- + +An error occurred creating the signature. + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The hash value of the data to be signed. + The buffer to receive the RSA signature. + The hash algorithm used to create the hash value of the data. + The padding. + When this method returns, the total number of bytes written into . This parameter is treated as uninitialized. + Attempts to sign the hash with the current key, writing the signature into a provided buffer. + + if is long enough to receive the RSA signature; otherwise, . + + and copies the result to `destination`. +Derived types should override this method to avoid the intermediate array creation. + +The RSA signature algorithm will always produce an output equal to the number of bytes required for bits. + + ]]> + + + is . + + . is or . + + is unknown, or not supported by this implementation. + +-or- + +This instance represents only a public key. + +-or- + +An error occurred creating the signature. + + + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + + + Verifies that a digital signature is valid. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + + + The signed data. + The signature data to be verified. + The hash algorithm used to create the hash value of the data. + The padding mode. + Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and padding, and comparing it to the provided signature. + + if the signature is valid; otherwise, . + To be added. + + is . + + -or- + + is . + + -or- + + is . + + . is or . + + is unknown, or not supported by this implementation. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + + + The signed data. + The signature data to be verified. + The hash algorithm used to create the hash value of the data. + The padding mode. + Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and padding, and comparing it to the provided signature. + + if the signature is valid; otherwise, . + To be added. + + is . + + -or- + + is . + + -or- + + is . + + . is or . + + is unknown, or not supported by this implementation. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + The signed data. + The signature data to be verified. + The hash algorithm used to create the hash value of the data. + The padding mode. + Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and padding, and comparing it to the provided signature. + + if the signature is valid; otherwise, . + To be added. + + . is or . + + is unknown, or not supported by this implementation. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + + + + + The signed data. + The starting index at which to compute the hash. + The number of bytes to hash. + The signature data to be verified. + The hash algorithm used to create the hash value of the data. + The padding mode. + 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 padding, and comparing it to the provided signature. + + if the signature is valid; otherwise, . + To be added. + + is . + + -or- + + is . + + -or- + + is . + + . is or . + + is less than zero. + + -or- + + is less than zero. + + -or- + + + - 1 results in an index that is beyond the upper bound of . + + is unknown, or not supported by this implementation. + + + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + + + The hash value of the signed data. + The signature data to be verified. + The hash algorithm used to create the hash value. + The padding mode. + Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value. + + if the signature is valid; otherwise, . + To be added. + A derived class must override this method. + + or is . + + . is or . + + is unknown, or not supported by this implementation. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Boolean + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + The hash value of the signed data. + The signature data to be verified. + The hash algorithm used to create the hash value. + The padding mode. + Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value. + + if the signature is valid; otherwise, . + + . +Derived types should override this method to avoid the intermediate array creation. + + ]]> + + + or is . + + . is or . + + is unknown, or not supported by this implementation. + + +
+
diff --git a/xml/System.Security.Cryptography/RSACng.xml b/xml/System.Security.Cryptography/RSACng.xml index 77a902b816c..e894d63a6c2 100644 --- a/xml/System.Security.Cryptography/RSACng.xml +++ b/xml/System.Security.Cryptography/RSACng.xml @@ -1,1486 +1,1493 @@ - - - - - - - - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - System.Security.Cryptography.RSA - - - - Provides a Cryptography Next Generation (CNG) implementation of the RSA algorithm. - - class is derived from the class. Therefore, it is not a drop-in replacement for existing uses of . - - uses a programming model that is similar to the class rather than the class. For example: - -- The key used by is managed by a separate object. In contrast, has a key that is directly tied to the operations of the type itself. - -- performs such operations as signing and verifying signatures by using properties of the object, just as uses its object properties to control signing and verification operations. - -> [!NOTE] -> The class is an implementation of the RSA algorithm using the Windows CNG libraries and isn't available on operating systems other than Windows. For applications which aren't doing Windows interop, you're encouraged to use instead of referencing this type directly. - - ]]> - - - - - - System.Security.Cryptography.Cng - 4.2.0.0 - - - Initializes a new instance of the class. - - - - - - - - - Constructor - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - - - Initializes a new instance of the class with a random 2,048-bit key pair. - - property to 2048 and when a key is needed one is generated using the property value. -If a key is loaded via the method, or other key import method, the key size from this constructor has no meaning. - - ]]> - - - - - - - - - - - Constructor - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - - - - - The size of the key to generate in bits. - Initializes a new instance of the class with a randomly generated key of the specified size. - - property to `keySize` and when a key is needed one is generated using the property value. -If a key is loaded via the method, or other key import method, the key size from this constructor has no meaning. - - ]]> - - - is not valid. - - - - - - - - - - Constructor - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - - - - The key to use for RSA operations. - Initializes a new instance of the class with the specified key. - - of `key` must be . - - This constructor creates a copy of the key. Even if `key` is disposed, the copy of this key object in RSA remains alive. - - ]]> - - - is not a valid RSA key. - - is . - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - The data to decrypt. - The padding mode. - Decrypts input data using the specified padding mode. - The decrypted data. - To be added. - - is . - - -or- - - is . - - . isn't equal to or . - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Security.Cryptography - - - System.Byte[] - - - - - - The cipher text to be decrypted. - Decrypts the input data using the private key. - The resulting decryption of the parameter in plain text. - To be added. - This method call is not supported. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - to release both managed and unmanaged resources; to release only unmanaged resources. - Releases the unmanaged resources used by the and optionally releases the managed resources. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - The data to encrypt. - The padding mode. - Encrypts the input data using the specified padding. - The encrypted data. - To be added. - - is . - - -or- - - is . - - . isn't equal to or . - - - - - - - - - - Method - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Security.Cryptography - - - System.Byte[] - - - - - - The plain text to be encrypted. - Encrypts the input data using the public key. - The resulting encryption of the parameter as cipher text. - To be added. - This method call is not supported. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.RSAParameters - - - - - - - to include private parameters; otherwise, . - Exports the key used by the RSA object into a object. - The key used by the RSA object. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - - - System.Byte[] - - - - - - - The binary stream to hash. - The hash algorithm. - Computes the hash value of a specified binary stream by using a specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - - - System.Byte[] - - - - - - - - - The data to be hashed. - The index of the first byte in that is to be hashed. - The number of bytes to hash. - The algorithm to use in hash the data. - Computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Void - - - - - - The RSA parameters. - Replaces the existing key that the current instance is working with by creating a new for the parameters structure. - - value with the new key, -any already open key is unaffected by this method. - - ]]> - - - contains neither an exponent nor a modulus. - - is not a valid RSA key. - - -or- - - is a full key pair and the default KSP is used. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Void - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Property - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - [get: System.Runtime.CompilerServices.NullableContext(1)] - [<get: System.Runtime.CompilerServices.NullableContext(1)>] - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.CngKey - - - Gets the key that will be used by the object for any cryptographic operation that it performs. - The key used by the object. - - object is disposed if the key is reset, for instance by changing the property, by using the to create a new key, or by disposing of the parent object. Therefore, you should ensure that the key object is no longer used in these cases. - - This object is not the same as the object passed to the constructor, if that constructor was used. However, it will point to the same CNG key. - - ]]> - - - - - - - - - - - Property - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Security.Cryptography - - - System.String - - - Gets the name of the key exchange algorithm available with this implementation of RSA. - Returns "RSA". - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - [get: System.Runtime.CompilerServices.NullableContext(1)] - [<get: System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.KeySizes[] - - - Gets the key sizes, in bits, that are supported by this implementation of RSA. - An array that contains the key sizes supported by the algorithm. - To be added. - - - - - - - - - - Property - - System.Core - 4.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Security.Cryptography - - - System.String - - - Gets the name of the signature algorithm available with this implementation of RSA. - Returns "RSA". - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - - The hash to sign. - The hash algorithm name. - The padding mode. - Signs data that was hashed by using the specified hashing algorithm and padding mode. - The signed data. - To be added. - - is . - - -or- - - is . - The value of the property of is or . - - does not equal or . - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Boolean - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - Decrypts data using the private key. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Boolean - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - Encrypts data using the public key. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Boolean - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Boolean - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Boolean - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography.Cng - 4.2.0.0 - 4.3.1.0 - 4.3.2.0 - 4.3.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Core - 4.0.0.0 - - - netstandard - 2.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - - - The hash to verify. - The signature of the data. - The hash algorithm name. - The padding mode. - Verifies data that was signed and already hashed with the specified algorithm and padding mode. - - if the signature verifies for the hash; otherwise, . - To be added. - - is . - - -or- - - is . - - -or- - - is . - The value of the property of is or . - - does not equal or . - - -or- - - The signature is badly formatted. (In the .NET Framework 4.6 and 4.6.1 only; starting with the .NET Framework 4.6.2, the method returns if a signature is badly formatted. - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Cng - - - System.Boolean - - - - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - + + + + + + + + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + System.Security.Cryptography.RSA + + + + Provides a Cryptography Next Generation (CNG) implementation of the RSA algorithm. + + class is derived from the class. Therefore, it is not a drop-in replacement for existing uses of . + + uses a programming model that is similar to the class rather than the class. For example: + +- The key used by is managed by a separate object. In contrast, has a key that is directly tied to the operations of the type itself. + +- performs such operations as signing and verifying signatures by using properties of the object, just as uses its object properties to control signing and verification operations. + +> [!NOTE] +> The class is an implementation of the RSA algorithm using the Windows CNG libraries and isn't available on operating systems other than Windows. For applications which aren't doing Windows interop, you're encouraged to use instead of referencing this type directly. + + ]]> + + + + + + System.Security.Cryptography.Cng + 4.2.0.0 + + + Initializes a new instance of the class. + + + + + + + + + Constructor + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + + + Initializes a new instance of the class with a random 2,048-bit key pair. + + property to 2048 and when a key is needed one is generated using the property value. +If a key is loaded via the method, or other key import method, the key size from this constructor has no meaning. + + ]]> + + + + + + + + + + + Constructor + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + + + + + The size of the key to generate in bits. + Initializes a new instance of the class with a randomly generated key of the specified size. + + property to `keySize` and when a key is needed one is generated using the property value. +If a key is loaded via the method, or other key import method, the key size from this constructor has no meaning. + + ]]> + + + is not valid. + + + + + + + + + + Constructor + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + + + + The key to use for RSA operations. + Initializes a new instance of the class with the specified key. + + of `key` must be . + + This constructor creates a copy of the key. Even if `key` is disposed, the copy of this key object in RSA remains alive. + + ]]> + + + is not a valid RSA key. + + is . + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + The data to decrypt. + The padding mode. + Decrypts input data using the specified padding mode. + The decrypted data. + To be added. + + is . + + -or- + + is . + + . isn't equal to or . + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Security.Cryptography + + + System.Byte[] + + + + + + The cipher text to be decrypted. + Decrypts the input data using the private key. + The resulting decryption of the parameter in plain text. + To be added. + This method call is not supported. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + to release both managed and unmanaged resources; to release only unmanaged resources. + Releases the unmanaged resources used by the and optionally releases the managed resources. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + The data to encrypt. + The padding mode. + Encrypts the input data using the specified padding. + The encrypted data. + To be added. + + is . + + -or- + + is . + + . isn't equal to or . + + + + + + + + + + Method + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Security.Cryptography + + + System.Byte[] + + + + + + The plain text to be encrypted. + Encrypts the input data using the public key. + The resulting encryption of the parameter as cipher text. + To be added. + This method call is not supported. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password. + A byte array containing the PKCS#8 EncryptedPrivateKeyInfo representation of this key. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.RSAParameters + + + + + + + to include private parameters; otherwise, . + Exports the key used by the RSA object into a object. + The key used by the RSA object. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + + + System.Byte[] + + + + + + + The binary stream to hash. + The hash algorithm. + Computes the hash value of a specified binary stream by using a specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + + + System.Byte[] + + + + + + + + + The data to be hashed. + The index of the first byte in that is to be hashed. + The number of bytes to hash. + The algorithm to use in hash the data. + Computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Void + + + + + + + + The bytes to use as a password when decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Void + + + + + + + + The password to use for decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Void + + + + + + The RSA parameters. + Replaces the existing key that the current instance is working with by creating a new for the parameters structure. + + value with the new key, +any already open key is unaffected by this method. + + ]]> + + + contains neither an exponent nor a modulus. + + is not a valid RSA key. + + -or- + + is a full key pair and the default KSP is used. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Void + + + + + + + The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object. + To be added. + + + + + + + + + + + Property + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + [get: System.Runtime.CompilerServices.NullableContext(1)] + [<get: System.Runtime.CompilerServices.NullableContext(1)>] + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.CngKey + + + Gets the key that will be used by the object for any cryptographic operation that it performs. + The key used by the object. + + object is disposed if the key is reset, for instance by changing the property, by using the to create a new key, or by disposing of the parent object. Therefore, you should ensure that the key object is no longer used in these cases. + + This object is not the same as the object passed to the constructor, if that constructor was used. However, it will point to the same CNG key. + + ]]> + + + + + + + + + + + Property + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Security.Cryptography + + + System.String + + + Gets the name of the key exchange algorithm available with this implementation of RSA. + Returns "RSA". + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + [get: System.Runtime.CompilerServices.NullableContext(1)] + [<get: System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.KeySizes[] + + + Gets the key sizes, in bits, that are supported by this implementation of RSA. + An array that contains the key sizes supported by the algorithm. + To be added. + + + + + + + + + + Property + + System.Core + 4.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Security.Cryptography + + + System.String + + + Gets the name of the signature algorithm available with this implementation of RSA. + Returns "RSA". + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + + The hash to sign. + The hash algorithm name. + The padding mode. + Signs data that was hashed by using the specified hashing algorithm and padding mode. + The signed data. + To be added. + + is . + + -or- + + is . + The value of the property of is or . + + does not equal or . + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Boolean + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The data to decrypt. + The buffer to receive the decrypted data. + The padding mode. + When this method returns, the total number of bytes written into destination. This parameter is treated as uninitialized. + Decrypts data using the private key. + + true if destination is long enough to receive the decrypted data; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Boolean + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The data to encrypt. + The buffer to receive the encrypted data. + The padding mode. + When this method returns, the total number of bytes written into destination. This parameter is treated as uninitialized. + Encrypts data using the public key. + + true if destination is long enough to receive the encrypted data; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Boolean + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Boolean + + + + + + + The byte span to receive the PKCS#8 PrivateKeyInfo data. + When this method returns, contains a value that indicates the number of bytes written to destination. This parameter is treated as uninitialized. + Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer. + + true if destination is big enough to receive the output; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Boolean + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The hash value of the data to be signed. + The buffer to receive the RSA signature. + The hash algorithm used to create the hash value of the data. + The padding. + When this method returns, the total number of bytes written into destination. This parameter is treated as uninitialized. + Attempts to sign the hash with the current key, writing the signature into a provided buffer. + + true if destination is long enough to receive the RSA signature; otherwise, false. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography.Cng + 4.2.0.0 + 4.3.1.0 + 4.3.2.0 + 4.3.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Core + 4.0.0.0 + + + netstandard + 2.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + + + The hash to verify. + The signature of the data. + The hash algorithm name. + The padding mode. + Verifies data that was signed and already hashed with the specified algorithm and padding mode. + + if the signature verifies for the hash; otherwise, . + To be added. + + is . + + -or- + + is . + + -or- + + is . + The value of the property of is or . + + does not equal or . + + -or- + + The signature is badly formatted. (In the .NET Framework 4.6 and 4.6.1 only; starting with the .NET Framework 4.6.2, the method returns if a signature is badly formatted. + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Cng + + + System.Boolean + + + + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + The hash value of the signed data. + The signature data to be verified. + The hash algorithm used to create the hash value. + The padding mode. + Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value. + + true if the signature is valid; otherwise, false. + To be added. + + + + + diff --git a/xml/System.Security.Cryptography/RSACryptoServiceProvider.xml b/xml/System.Security.Cryptography/RSACryptoServiceProvider.xml index c215340437f..bcbaf50f0bb 100644 --- a/xml/System.Security.Cryptography/RSACryptoServiceProvider.xml +++ b/xml/System.Security.Cryptography/RSACryptoServiceProvider.xml @@ -1,2606 +1,2606 @@ - - - - - - - - - - - - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.Security.Cryptography.RSA - - - - System.Security.Cryptography.ICspAsymmetricAlgorithm - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Runtime.InteropServices.ComVisible(true)] - [<System.Runtime.InteropServices.ComVisible(true)>] - - - - Performs asymmetric encryption and decryption using the implementation of the algorithm provided by the cryptographic service provider (CSP). This class cannot be inherited. - - . - - The supports key sizes from 384 bits to 16384 bits in increments of 8 bits if you have the Microsoft Enhanced Cryptographic Provider installed. It supports key sizes from 384 bits to 512 bits in increments of 8 bits if you have the Microsoft Base Cryptographic Provider installed. - - Valid key sizes are dependent on the cryptographic service provider (CSP) that is used by the instance. Windows CSPs enable keys sizes of 384 to 16384 bits for Windows versions prior to Windows 8.1, and key sizes of 512 to 16384 bits for Windows 8.1. For more information, see [CryptGenKey](/windows/win32/api/wincrypt/nf-wincrypt-cryptgenkey) function in the Windows documentation. - -## Interoperation with the Microsoft Cryptographic API (CAPI) - Unlike the RSA implementation in unmanaged CAPI, the class reverses the order of an encrypted array of bytes after encryption and before decryption. By default, data encrypted by the class cannot be decrypted by the CAPI `CryptDecrypt` function and data encrypted by the CAPI `CryptEncrypt` method cannot be decrypted by the class. - - If you do not compensate for the reverse ordering when interoperating between APIs, the class throws a . - - To interoperate with CAPI, you must manually reverse the order of encrypted bytes before the encrypted data interoperates with another API. You can easily reverse the order of a managed byte array by calling the method. - - - -## Examples - The following code example uses the class to encrypt a string into an array of bytes and then decrypt the bytes back into a string. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider/CPP/sample.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider/VB/sample.vb" id="Snippet1"::: - - The following code example exports the key information created using the into an object. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ExportParameters/CPP/sample.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Overview/sample1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ExportParameters/VB/sample.vb" id="Snippet1"::: - - ]]> - - Cryptographic Services - - - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - - - Initializes a new instance of the class. - - - - - - - - - Constructor - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - - Initializes a new instance of the class with a random key pair. - - key pair suitable to encrypt session keys so that they can be safely stored and exchanged with other users. The generated key corresponds to a key generated using the `AT_KEYEXCHANGE` value used in the unmanaged Microsoft Cryptographic API (CAPI). - -This constructor does not generate a new public/private keypair immediately. -If no key is loaded via the method, or any other key import method, before a key is needed then a 1024-bit ephemeral key is created on demand. - - -## Examples - The following code example uses the class to encrypt a string into an array of bytes and then decrypt the bytes back into a string. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider/CPP/sample.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider/VB/sample.vb" id="Snippet1"::: - - ]]> - - The cryptographic service provider (CSP) cannot be acquired. - Cryptographic Services - - - - - - - - - - Constructor - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - - - - The size of the key to use in bits. - Initializes a new instance of the class with a random key pair of the specified key size. - - key pair suitable to encrypt session keys so that they can be safely stored and exchanged with other users. The generated key corresponds to a key generated using the `AT_KEYEXCHANGE` value used in the unmanaged Microsoft Cryptographic API (CAPI). - -This constructor does not generate a new public/private keypair immediately. -If no key is loaded via the method, or any other key import method, before a key is needed then a `dwKeySize`-bit ephemeral key is created on demand. - - -## Examples - The following code example creates a , generates a new key, and stores it in a key container. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.ctor-int32-2/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/.ctor/example1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.ctor-int32-2/VB/example.vb" id="Snippet1"::: - - ]]> - - The cryptographic service provider (CSP) cannot be acquired. - Cryptographic Services - - - - - - - - - - - Constructor - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - - - - The parameters to be passed to the cryptographic service provider (CSP). - Initializes a new instance of the class with the specified parameters. - - field of the `parameters` parameter. - - By default, this constructor creates an key pair suitable to encrypt session keys so that they can be safely stored and exchanged with other users. The generated key corresponds to a key generated using the `AT_KEYEXCHANGE` value used in the unmanaged Microsoft Cryptographic API (CAPI). - - You can create a key pair suitable for authenticating (digitally signed) messages or files by setting the field of the `parameters` parameter to the value. This type of key corresponds to the `AT_SIGNATURE` value used in CAPI. - - If you create an object with the value specified and then create another object with the value specified, both keys will be placed in a single container if both objects specify the same key container name. - - To create a key that is compatible with strong-name signing using the class, you must create a key pair. - - - -## Examples - The following code example creates an object, generates a new key, and stores it in a key container. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.ctor-csp/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/.ctor/example.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.ctor-csp/VB/example.vb" id="Snippet1"::: - - ]]> - - The CSP cannot be acquired. - Cryptographic Services - - - - - - - - - - - Constructor - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - - - - - The size of the key to use in bits. - The parameters to be passed to the cryptographic service provider (CSP). - Initializes a new instance of the class with the specified key size and parameters. - - field of the `parameters` parameter. - - By default, this constructor creates an key pair suitable to encrypt session keys so that they can be safely stored and exchanged with other users. The generated key corresponds to a key generated using the `AT_KEYEXCHANGE` value used in the unmanaged Microsoft Cryptographic API (CAPI). - - You can create a key pair suitable for authenticating (digitally signed) messages or files by setting the field of the `parameters` parameter to the value. This type of key corresponds to the `AT_SIGNATURE` value used in CAPI. - - If you create an object with the value specified and then create another object with the value specified, both keys will be placed in a single container if both objects specify the same key container name. - - To create a key that is compatible with strong-name signing using the class, you must create a key pair. - - - -## Examples - The following code example creates a , generates a new key, and stores it in a key container. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.ctor-int32-csp/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/.ctor/example2.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.ctor-int32-csp/VB/example.vb" id="Snippet1"::: - - ]]> - - The CSP cannot be acquired. - - -or- - - The key cannot be created. - Cryptographic Services - - - - - - - - - - Property - - P:System.Security.Cryptography.ICspAsymmetricAlgorithm.CspKeyContainerInfo - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] - - - [System.Runtime.InteropServices.ComVisible(false)] - [<System.Runtime.InteropServices.ComVisible(false)>] - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.CspKeyContainerInfo - - - Gets a object that describes additional information about a cryptographic key pair. - A object that describes additional information about a cryptographic key pair. - - property to retrieve additional information about a cryptographic key pair. The returned object describes whether the key is exportable, and specifies the key container name, information about the provider, and other information. - - In cases where a random key is generated, a key container will not be created until you call a method that uses the key. Some properties of the object returned by the property will throw a if a key container has not been created. To make sure that a key container has been created, call a method such as , , , , and so on, before you call the property. - - - -## Examples - The following code example demonstrates how to call the property. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RsaCryptoServiceProvider.CspKeyContainerInfo/CPP/sample.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CspKeyContainerInfo/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RsaCryptoServiceProvider.CspKeyContainerInfo/VB/sample.vb" id="Snippet1"::: - - ]]> - - Cryptographic Services - - - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - - - Decrypts data that was previously encrypted. - - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - The data to be decrypted. - - to perform direct decryption using OAEP padding; otherwise, to use PKCS#1 v1.5 padding. - Decrypts data with the algorithm. - The decrypted data, which is the original plain text before encryption. - - to encrypt data for decryption with this method. - - - -## Examples - The following code example encrypts and decrypts data. - - This example uses the class; however, the class may be preferable in large data operations. The encrypted value can be saved as an `nvarchar` data type in Microsoft SQL Server. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.Decrypt/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Decrypt/example.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.Decrypt/VB/example.vb" id="Snippet1"::: - - ]]> - - The cryptographic service provider (CSP) cannot be acquired. - - -or- - - The parameter is and the length of the parameter is greater than . - - -or- - - The key does not match the encrypted data. However, the exception wording may not be accurate. For example, it may say Not enough storage is available to process this command. - - is . - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - The data to decrypt. - The padding. - Decrypts data that was previously encrypted with the algorithm by using the specified padding. - The decrypted data. - - or . - - ]]> - - - is . - - -or- - - is . - The padding mode is not supported. - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>] - - - [System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - System.Byte[] - - - - - - The data to be decrypted. - This method is not supported in the current version. - The decrypted data, which is the original plain text before encryption. - To be added. - This method is not supported in the current version. - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Void - - - - - - - to release both managed and unmanaged resources; to release only unmanaged resources. - Releases the unmanaged resources used by the class and optionally releases the managed resources. - To be added. - - - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - - - Encrypts data with the algorithm. - - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - The data to be encrypted. - - to perform direct encryption using OAEP padding (only available on a computer running Windows XP or later); otherwise, to use PKCS#1 v1.5 padding. - Encrypts data with the algorithm. - The encrypted data. - - to decrypt the results of this method. - - - -## Examples - The following code example initializes an object to the value of a public key (sent by another party), generates a session key using the algorithm, and then encrypts the session key using the object. Using this scheme, the session key could be sent back to the owner of the private RSA key and the two parties could use the session key to exchange encrypted data. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.Encrypt/CPP/sample.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Encrypt/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.Encrypt/VB/sample.vb" id="Snippet1"::: - - ]]> - - The cryptographic service provider (CSP) cannot be acquired. - - -or- - - The length of the parameter is greater than the maximum allowed length. - - is . - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - The data to encrypt. - The padding. - Encrypts data with the algorithm using the specified padding. - The encrypted data. - - or . - - ]]> - - - is . - - -or- - - is . - The padding mode is not supported. - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>] - - - [System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - - System.Byte[] - - - - - - The data to be encrypted. - This method is not supported in the current version. - The encrypted data. - To be added. - This method is not supported in the current version. - Cryptographic Services - - - - - - - - - - Method - - M:System.Security.Cryptography.ICspAsymmetricAlgorithm.ExportCspBlob(System.Boolean) - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.InteropServices.ComVisible(false)] - [<System.Runtime.InteropServices.ComVisible(false)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - to include the private key; otherwise, . - Exports a blob containing the key information associated with an object. - A byte array containing the key information associated with an object. - - method returns a blob containing key information that is compatible with the unmanaged Microsoft Cryptographic API (CAPI). - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.RSAParameters - - - - - - - to include private parameters; otherwise, . - Exports the . - The parameters for . - - into an object. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ExportParameters/CPP/sample.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Overview/sample1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ExportParameters/VB/sample.vb" id="Snippet1"::: - - ]]> - - The key cannot be exported. - Cryptographic Services - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.5.0 - 4.0.0.0 - - - System.Security.Cryptography.Csp - - - netstandard - - - System.Security.Cryptography - - - System.Void - - - - Releases the unmanaged resources held by this instance. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - The binary stream to hash. - The hash algorithm. - Computes the hash value of a specified binary stream by using a specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - - - The data to be hashed. - The index of the first byte in that is to be hashed. - The number of bytes to hash. - The algorithm to use in hash the data. - Computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. - The hashed data. - To be added. - - - - - - - - - - Method - - M:System.Security.Cryptography.ICspAsymmetricAlgorithm.ImportCspBlob(System.Byte[]) - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.InteropServices.ComVisible(false)] - [<System.Runtime.InteropServices.ComVisible(false)>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Void - - - - - - A byte array that represents an RSA key blob. - Imports a blob that represents RSA key information. - - method initializes the key data of an object using a blob that is compatible with the unmanaged Microsoft Cryptographic API (CAPI). - - ]]> - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Csp - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.Csp - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Void - - - - - - The parameters for . - Imports the specified . - - object into an object. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ImportParameters/CPP/sample.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/ImportParameters/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ImportParameters/VB/sample.vb" id="Snippet1"::: - - ]]> - - The cryptographic service provider (CSP) cannot be acquired. - - -or- - - The parameter has missing fields. - Cryptographic Services - - - - - - - - - - - Property - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - [get: System.Runtime.CompilerServices.NullableContext(2)] - [<get: System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.String - - - Gets the name of the key exchange algorithm available with this implementation of . - The name of the key exchange algorithm if it exists; otherwise, . - - - - Cryptographic Services - - - - - - - - - - Property - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - - System.Int32 - - - Gets the size of the current key. - The size of the key in bits. - - supports key sizes from 384 bits to 16384 bits in increments of 8 bits if you have the Microsoft Enhanced Cryptographic Provider installed. It supports key sizes from 384 bits to 512 bits in increments of 8 bits if you have the Microsoft Base Cryptographic Provider installed. - - Valid key sizes are dependent on the cryptographic service provider (CSP) that is used by the instance. Windows CSPs enable key sizes of 384 to 16384 bits for Windows versions prior to Windows 8.1, and key sizes of 512 to 16384 bits for Windows 8.1. For more information, see [CryptGenKey](/windows/win32/api/wincrypt/nf-wincrypt-cryptgenkey) function in the Windows documentation. - - The class does not allow you to change key sizes using the property. Any value written to this property will fail to update the property without error. To change the key size, use one of the constructor overloads. - - ]]> - - Cryptographic Services - - - - - - - - - - Property - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.KeySizes[] - - - Gets the key sizes that are supported by the asymmetric algorithm. - An array that contains the key sizes supported by the asymmetric algorithm. - - remarks. - - ]]> - - - - - - - - - - - Property - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - [set: System.Security.SecuritySafeCritical] - [<set: System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - Gets or sets a value indicating whether the key should be persisted in the cryptographic service provider (CSP). - - if the key should be persisted in the CSP; otherwise, . - - property is automatically set to `true` when you specify a key container name in the field of a object and use it to initialize an object by calling one of the constructors with a `parameters` parameter. - - The property has no effect if the object is created with a `null` key container name. - - - -## Examples - The following code example creates an object and persists the key to a key container. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.PersistKey/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/PersistKeyInCsp/example.cs" interactive="try-dotnet" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.PersistKey/VB/example.vb" id="Snippet1"::: - - ]]> - - Cryptographic Services - - - - - - - - - - Property - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.InteropServices.ComVisible(false)] - [<System.Runtime.InteropServices.ComVisible(false)>] - - - [get: System.Security.SecuritySafeCritical] - [<get: System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - Gets a value that indicates whether the object contains only a public key. - - if the object contains only a public key; otherwise, . - - class can be initialized either with a public key only or with both a public and private key. Use the property to determine whether the current instance contains only a public key or both a public and private key. - - ]]> - - Cryptographic Services - - - - - - - - - - Property - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Csp - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.String - - - Gets the name of the signature algorithm available with this implementation of . - The name of the signature algorithm. - - - - Cryptographic Services - - - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - - - Computes the hash value of the specified data and signs it. - - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - The input data to hash and sign. - The hash algorithm to use to create the hash value. - Computes the hash value of the specified byte array using the specified hash algorithm, and signs the resulting hash value. - The signature for the specified data. - - method. - - The `halg` parameter can accept a , a , or a . - - - -## Examples - The following code example signs and verifies data. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.SignData2/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignData/example1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.SignData2/VB/example.vb" id="Snippet1"::: - - ]]> - - The parameter is . - The parameter is not a valid type. - - Cryptographic Services - - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - The input stream to hash and sign. - The hash algorithm to use to create the hash value. - Computes the hash value of the specified input stream using the specified hash algorithm, and signs the resulting hash value. - The signature for the specified data. - - , a , or a . - - - -## Examples - The following code example signs and verifies data. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.SignData3/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignData/example2.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.SignData3/VB/example.vb" id="Snippet1"::: - - ]]> - - The parameter is . - The parameter is not a valid type. - - Cryptographic Services - - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - - - The input data to hash and sign. - The offset into the array from which to begin using data. - The number of bytes in the array to use as data. - The hash algorithm to use to create the hash value. - Computes the hash value of a subset of the specified byte array using the specified hash algorithm, and signs the resulting hash value. - The signature for the specified data. - - method. - - The `halg` parameter can accept a , a , or a . The string value can be one of the following: - -- The object identifier (OID) friendly name of the hash algorithm to use, either a name registered in the crypto config file or one in the Crypto API OID table. - -- The OID value. The OID must be one recognized by the Crypto API. - - For example, you could use SignData(new byte[5], "1.3.14.3.2.26") or SignData(new byte[5], "sha1"), or SignData(new byte[5], "SHA1"). - - - -## Examples - The following code example signs and verifies data. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.SignData1/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignData/example.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.SignData1/VB/example.vb" id="Snippet1"::: - - ]]> - - The parameter is . - The parameter is not a valid type. - - Cryptographic Services - - - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - - - Computes the signature for the specified hash value. - - - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Byte[] - - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - The hash value of the data to be signed. - The hash algorithm identifier (OID) used to create the hash value of the data. - Computes the signature for the specified hash value. - The signature for the specified hash value. - - method. - - The valid hash algorithms are and . The algorithm identifier can be derived from the hash name by using the method. - - Due to collision problems with SHA1 and MD5, Microsoft recommends a security model based on SHA256 or better. - -## Examples - The following code example encrypts some data, creates a hash of the encrypted data, and then signs hash with a digital signature. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/CPP/class1.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignHash/class1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/VB/class1.vb" id="Snippet1"::: - - ]]> - - The parameter is . - The cryptographic service provider (CSP) cannot be acquired. - - -or- - - There is no private key. - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - - - The hash value of the data to be signed. - The hash algorithm name used to create the hash value of the data. - The padding. - Computes the signature for the specified hash value using the specified padding. - The signature for the specified hash value. - To be added. - - is or . - - is . - - -or- - - is . - - does not equal . - - - - - - - - - - Property - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - Gets or sets a value indicating whether the key should be persisted in the computer's key store instead of the user profile store. - - if the key should be persisted in the computer key store; otherwise, . - - flag to a object. The property applies to all code in the current application domain, whereas the object applies only to classes that explicitly reference it. These settings are useful when impersonating or running under an account whose user profile is not loaded. Setting affects the key store location only if is initialized with no parameters. - - - -## Examples - The following code example creates an object and sets the static property to use the machine key store instead of the user profile key store. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.UseMachineKey/CPP/example2.cpp" id="Snippet2"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/UseMachineKeyStore/example2.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.UseMachineKey/VB/example2.vb" id="Snippet2"::: - - ]]> - - Cryptographic Services - - - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - - - Verifies that a digital signature is valid. - - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - - The data that was signed. - The name of the hash algorithm used to create the hash value of the data. - The signature data to be verified. - Verifies that a digital signature is valid by determining the hash value in the signature using the provided public key and comparing it to the hash value of the provided data. - - if the signature is valid; otherwise, . - - digital signature produced by the method. The signature is verified by obtaining the hash value from the signature using the public key it was signed with, and comparing that value to the hash value of the provided data. - - The `halg` parameter can accept a , a , or a . - - - -## Examples - The following example shows how to use the method to verify a signature. This code example is part of a larger example provided for the method. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/CPP/class1.cpp" id="Snippet2"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignHash/class1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/VB/class1.vb" id="Snippet2"::: - - ]]> - - The parameter is . - The parameter is not a valid type. - - Cryptographic Services - - - - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - - - Verifies that a digital signature is valid. - - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Boolean - - - - - - - - The hash value of the signed data. - The hash algorithm identifier (OID) used to create the hash value of the data. - The signature data to be verified. - Verifies that a digital signature is valid by determining the hash value in the signature using the provided public key and comparing it to the provided hash value. - - if the signature is valid; otherwise, . - - digital signature produced by the method. The signature is verified by obtaining the hash value from the signature using the public key it was signed with, and comparing that value to the hash value of the provided data. - - The valid hash algorithms are and . The algorithm identifier can be derived from the hash name by using the method. - - Due to collision problems with SHA1 and MD5, Microsoft recommends a security model based on SHA256 or better. - -## Examples - The following example shows how to use the method to verify a signature. This code example is part of a larger example provided for the method. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/CPP/class1.cpp" id="Snippet2"::: - :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignHash/class1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/VB/class1.vb" id="Snippet2"::: - - ]]> - - The parameter is . - - -or- - - The parameter is . - The cryptographic service provider (CSP) cannot be acquired. - - -or- - - The signature cannot be verified. - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Csp - 4.0.0.0 - 4.1.0.0 - 4.1.1.0 - 4.1.2.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - - - - - - The hash value of the signed data. - The signature data to be verified. - The hash algorithm name used to create the hash value. - The padding. - Verifies that a digital signature is valid by determining the hash value in the signature using the specified hashing algorithm and padding, and comparing it to the provided hash value. - - if the signature is valid; otherwise, . - To be added. - - is or . - - is . - - -or- - - is . - - does not equal . - - - - + + + + + + + + + + + + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.Security.Cryptography.RSA + + + + System.Security.Cryptography.ICspAsymmetricAlgorithm + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Runtime.InteropServices.ComVisible(true)] + [<System.Runtime.InteropServices.ComVisible(true)>] + + + + Performs asymmetric encryption and decryption using the implementation of the algorithm provided by the cryptographic service provider (CSP). This class cannot be inherited. + + . + + The supports key sizes from 384 bits to 16384 bits in increments of 8 bits if you have the Microsoft Enhanced Cryptographic Provider installed. It supports key sizes from 384 bits to 512 bits in increments of 8 bits if you have the Microsoft Base Cryptographic Provider installed. + + Valid key sizes are dependent on the cryptographic service provider (CSP) that is used by the instance. Windows CSPs enable keys sizes of 384 to 16384 bits for Windows versions prior to Windows 8.1, and key sizes of 512 to 16384 bits for Windows 8.1. For more information, see [CryptGenKey](/windows/win32/api/wincrypt/nf-wincrypt-cryptgenkey) function in the Windows documentation. + +## Interoperation with the Microsoft Cryptographic API (CAPI) + Unlike the RSA implementation in unmanaged CAPI, the class reverses the order of an encrypted array of bytes after encryption and before decryption. By default, data encrypted by the class cannot be decrypted by the CAPI `CryptDecrypt` function and data encrypted by the CAPI `CryptEncrypt` method cannot be decrypted by the class. + + If you do not compensate for the reverse ordering when interoperating between APIs, the class throws a . + + To interoperate with CAPI, you must manually reverse the order of encrypted bytes before the encrypted data interoperates with another API. You can easily reverse the order of a managed byte array by calling the method. + + + +## Examples + The following code example uses the class to encrypt a string into an array of bytes and then decrypt the bytes back into a string. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider/CPP/sample.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Overview/sample.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider/VB/sample.vb" id="Snippet1"::: + + The following code example exports the key information created using the into an object. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ExportParameters/CPP/sample.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Overview/sample1.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ExportParameters/VB/sample.vb" id="Snippet1"::: + + ]]> + + Cryptographic Services + + + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + + + Initializes a new instance of the class. + + + + + + + + + Constructor + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + + Initializes a new instance of the class with a random key pair. + + key pair suitable to encrypt session keys so that they can be safely stored and exchanged with other users. The generated key corresponds to a key generated using the `AT_KEYEXCHANGE` value used in the unmanaged Microsoft Cryptographic API (CAPI). + +This constructor does not generate a new public/private keypair immediately. +If no key is loaded via the method, or any other key import method, before a key is needed then a 1024-bit ephemeral key is created on demand. + + +## Examples + The following code example uses the class to encrypt a string into an array of bytes and then decrypt the bytes back into a string. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider/CPP/sample.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Overview/sample.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider/VB/sample.vb" id="Snippet1"::: + + ]]> + + The cryptographic service provider (CSP) cannot be acquired. + Cryptographic Services + + + + + + + + + + Constructor + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + + + + The size of the key to use in bits. + Initializes a new instance of the class with a random key pair of the specified key size. + + key pair suitable to encrypt session keys so that they can be safely stored and exchanged with other users. The generated key corresponds to a key generated using the `AT_KEYEXCHANGE` value used in the unmanaged Microsoft Cryptographic API (CAPI). + +This constructor does not generate a new public/private keypair immediately. +If no key is loaded via the method, or any other key import method, before a key is needed then a `dwKeySize`-bit ephemeral key is created on demand. + + +## Examples + The following code example creates a , generates a new key, and stores it in a key container. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.ctor-int32-2/CPP/example.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/.ctor/example1.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.ctor-int32-2/VB/example.vb" id="Snippet1"::: + + ]]> + + The cryptographic service provider (CSP) cannot be acquired. + Cryptographic Services + + + + + + + + + + + Constructor + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + + + + The parameters to be passed to the cryptographic service provider (CSP). + Initializes a new instance of the class with the specified parameters. + + field of the `parameters` parameter. + + By default, this constructor creates an key pair suitable to encrypt session keys so that they can be safely stored and exchanged with other users. The generated key corresponds to a key generated using the `AT_KEYEXCHANGE` value used in the unmanaged Microsoft Cryptographic API (CAPI). + + You can create a key pair suitable for authenticating (digitally signed) messages or files by setting the field of the `parameters` parameter to the value. This type of key corresponds to the `AT_SIGNATURE` value used in CAPI. + + If you create an object with the value specified and then create another object with the value specified, both keys will be placed in a single container if both objects specify the same key container name. + + To create a key that is compatible with strong-name signing using the class, you must create a key pair. + + + +## Examples + The following code example creates an object, generates a new key, and stores it in a key container. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.ctor-csp/CPP/example.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/.ctor/example.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.ctor-csp/VB/example.vb" id="Snippet1"::: + + ]]> + + The CSP cannot be acquired. + Cryptographic Services + + + + + + + + + + + Constructor + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + + + + + The size of the key to use in bits. + The parameters to be passed to the cryptographic service provider (CSP). + Initializes a new instance of the class with the specified key size and parameters. + + field of the `parameters` parameter. + + By default, this constructor creates an key pair suitable to encrypt session keys so that they can be safely stored and exchanged with other users. The generated key corresponds to a key generated using the `AT_KEYEXCHANGE` value used in the unmanaged Microsoft Cryptographic API (CAPI). + + You can create a key pair suitable for authenticating (digitally signed) messages or files by setting the field of the `parameters` parameter to the value. This type of key corresponds to the `AT_SIGNATURE` value used in CAPI. + + If you create an object with the value specified and then create another object with the value specified, both keys will be placed in a single container if both objects specify the same key container name. + + To create a key that is compatible with strong-name signing using the class, you must create a key pair. + + + +## Examples + The following code example creates a , generates a new key, and stores it in a key container. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.ctor-int32-csp/CPP/example.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/.ctor/example2.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.ctor-int32-csp/VB/example.vb" id="Snippet1"::: + + ]]> + + The CSP cannot be acquired. + + -or- + + The key cannot be created. + Cryptographic Services + + + + + + + + + + Property + + P:System.Security.Cryptography.ICspAsymmetricAlgorithm.CspKeyContainerInfo + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + [<System.Runtime.Versioning.SupportedOSPlatform("windows")>] + + + [System.Runtime.InteropServices.ComVisible(false)] + [<System.Runtime.InteropServices.ComVisible(false)>] + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.CspKeyContainerInfo + + + Gets a object that describes additional information about a cryptographic key pair. + A object that describes additional information about a cryptographic key pair. + + property to retrieve additional information about a cryptographic key pair. The returned object describes whether the key is exportable, and specifies the key container name, information about the provider, and other information. + + In cases where a random key is generated, a key container will not be created until you call a method that uses the key. Some properties of the object returned by the property will throw a if a key container has not been created. To make sure that a key container has been created, call a method such as , , , , and so on, before you call the property. + + + +## Examples + The following code example demonstrates how to call the property. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RsaCryptoServiceProvider.CspKeyContainerInfo/CPP/sample.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/CspKeyContainerInfo/Overview/sample.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RsaCryptoServiceProvider.CspKeyContainerInfo/VB/sample.vb" id="Snippet1"::: + + ]]> + + Cryptographic Services + + + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + + + Decrypts data that was previously encrypted. + + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + The data to be decrypted. + + to perform direct decryption using OAEP padding; otherwise, to use PKCS#1 v1.5 padding. + Decrypts data with the algorithm. + The decrypted data, which is the original plain text before encryption. + + to encrypt data for decryption with this method. + + + +## Examples + The following code example encrypts and decrypts data. + + This example uses the class; however, the class may be preferable in large data operations. The encrypted value can be saved as an `nvarchar` data type in Microsoft SQL Server. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.Decrypt/CPP/example.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Decrypt/example.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.Decrypt/VB/example.vb" id="Snippet1"::: + + ]]> + + The cryptographic service provider (CSP) cannot be acquired. + + -or- + + The parameter is and the length of the parameter is greater than . + + -or- + + The key does not match the encrypted data. However, the exception wording may not be accurate. For example, it may say Not enough storage is available to process this command. + + is . + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + The data to decrypt. + The padding. + Decrypts data that was previously encrypted with the algorithm by using the specified padding. + The decrypted data. + + or . + + ]]> + + + is . + + -or- + + is . + The padding mode is not supported. + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>] + + + [System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + System.Byte[] + + + + + + The data to be decrypted. + This method is not supported in the current version. + The decrypted data, which is the original plain text before encryption. + To be added. + This method is not supported in the current version. + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Void + + + + + + + to release both managed and unmanaged resources; to release only unmanaged resources. + Releases the unmanaged resources used by the class and optionally releases the managed resources. + To be added. + + + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + + + Encrypts data with the algorithm. + + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + The data to be encrypted. + + to perform direct encryption using OAEP padding (only available on a computer running Windows XP or later); otherwise, to use PKCS#1 v1.5 padding. + Encrypts data with the algorithm. + The encrypted data. + + to decrypt the results of this method. + + + +## Examples + The following code example initializes an object to the value of a public key (sent by another party), generates a session key using the algorithm, and then encrypts the session key using the object. Using this scheme, the session key could be sent back to the owner of the private RSA key and the two parties could use the session key to exchange encrypted data. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.Encrypt/CPP/sample.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Encrypt/sample.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.Encrypt/VB/sample.vb" id="Snippet1"::: + + ]]> + + The cryptographic service provider (CSP) cannot be acquired. + + -or- + + The length of the parameter is greater than the maximum allowed length. + + is . + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + The data to encrypt. + The padding. + Encrypts data with the algorithm using the specified padding. + The encrypted data. + + or . + + ]]> + + + is . + + -or- + + is . + The padding mode is not supported. + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + [<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>] + + + [System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + + System.Byte[] + + + + + + The data to be encrypted. + This method is not supported in the current version. + The encrypted data. + To be added. + This method is not supported in the current version. + Cryptographic Services + + + + + + + + + + Method + + M:System.Security.Cryptography.ICspAsymmetricAlgorithm.ExportCspBlob(System.Boolean) + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.InteropServices.ComVisible(false)] + [<System.Runtime.InteropServices.ComVisible(false)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + to include the private key; otherwise, . + Exports a blob containing the key information associated with an object. + A byte array containing the key information associated with an object. + + method returns a blob containing key information that is compatible with the unmanaged Microsoft Cryptographic API (CAPI). + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.RSAParameters + + + + + + + to include private parameters; otherwise, . + Exports the . + The parameters for . + + into an object. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ExportParameters/CPP/sample.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/Overview/sample1.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ExportParameters/VB/sample.vb" id="Snippet1"::: + + ]]> + + The key cannot be exported. + Cryptographic Services + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.5.0 + 4.0.0.0 + + + System.Security.Cryptography.Csp + + + netstandard + + + System.Security.Cryptography + + + System.Void + + + + Releases the unmanaged resources held by this instance. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + The binary stream to hash. + The hash algorithm. + Computes the hash value of a specified binary stream by using a specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + + + The data to be hashed. + The index of the first byte in that is to be hashed. + The number of bytes to hash. + The algorithm to use in hash the data. + Computes the hash value of a specified portion of a byte array by using a specified hashing algorithm. + The hashed data. + To be added. + + + + + + + + + + Method + + M:System.Security.Cryptography.ICspAsymmetricAlgorithm.ImportCspBlob(System.Byte[]) + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.InteropServices.ComVisible(false)] + [<System.Runtime.InteropServices.ComVisible(false)>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Void + + + + + + A byte array that represents an RSA key blob. + Imports a blob that represents RSA key information. + + method initializes the key data of an object using a blob that is compatible with the unmanaged Microsoft Cryptographic API (CAPI). + + ]]> + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Csp + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The bytes to use as a password when decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.Csp + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + + The password to use for decrypting the key material. + The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding. + When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized. + Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Void + + + + + + The parameters for . + Imports the specified . + + object into an object. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ImportParameters/CPP/sample.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/ImportParameters/sample.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Security.Cryptography.RSACryptoServiceProvider.ImportParameters/VB/sample.vb" id="Snippet1"::: + + ]]> + + The cryptographic service provider (CSP) cannot be acquired. + + -or- + + The parameter has missing fields. + Cryptographic Services + + + + + + + + + + + Property + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + [get: System.Runtime.CompilerServices.NullableContext(2)] + [<get: System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.String + + + Gets the name of the key exchange algorithm available with this implementation of . + The name of the key exchange algorithm if it exists; otherwise, . + + + + Cryptographic Services + + + + + + + + + + Property + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + + System.Int32 + + + Gets the size of the current key. + The size of the key in bits. + + supports key sizes from 384 bits to 16384 bits in increments of 8 bits if you have the Microsoft Enhanced Cryptographic Provider installed. It supports key sizes from 384 bits to 512 bits in increments of 8 bits if you have the Microsoft Base Cryptographic Provider installed. + + Valid key sizes are dependent on the cryptographic service provider (CSP) that is used by the instance. Windows CSPs enable key sizes of 384 to 16384 bits for Windows versions prior to Windows 8.1, and key sizes of 512 to 16384 bits for Windows 8.1. For more information, see [CryptGenKey](/windows/win32/api/wincrypt/nf-wincrypt-cryptgenkey) function in the Windows documentation. + + The class does not allow you to change key sizes using the property. Any value written to this property will fail to update the property without error. To change the key size, use one of the constructor overloads. + + ]]> + + Cryptographic Services + + + + + + + + + + Property + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.KeySizes[] + + + Gets the key sizes that are supported by the asymmetric algorithm. + An array that contains the key sizes supported by the asymmetric algorithm. + + remarks. + + ]]> + + + + + + + + + + + Property + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + [set: System.Security.SecuritySafeCritical] + [<set: System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + Gets or sets a value indicating whether the key should be persisted in the cryptographic service provider (CSP). + + if the key should be persisted in the CSP; otherwise, . + + property is automatically set to `true` when you specify a key container name in the field of a object and use it to initialize an object by calling one of the constructors with a `parameters` parameter. + + The property has no effect if the object is created with a `null` key container name. + + + +## Examples + The following code example creates an object and persists the key to a key container. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.PersistKey/CPP/example.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/PersistKeyInCsp/example.cs" interactive="try-dotnet" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.PersistKey/VB/example.vb" id="Snippet1"::: + + ]]> + + Cryptographic Services + + + + + + + + + + Property + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.InteropServices.ComVisible(false)] + [<System.Runtime.InteropServices.ComVisible(false)>] + + + [get: System.Security.SecuritySafeCritical] + [<get: System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + Gets a value that indicates whether the object contains only a public key. + + if the object contains only a public key; otherwise, . + + class can be initialized either with a public key only or with both a public and private key. Use the property to determine whether the current instance contains only a public key or both a public and private key. + + ]]> + + Cryptographic Services + + + + + + + + + + Property + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Csp + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.String + + + Gets the name of the signature algorithm available with this implementation of . + The name of the signature algorithm. + + + + Cryptographic Services + + + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + + + Computes the hash value of the specified data and signs it. + + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + The input data to hash and sign. + The hash algorithm to use to create the hash value. + Computes the hash value of the specified byte array using the specified hash algorithm, and signs the resulting hash value. + The signature for the specified data. + + method. + + The `halg` parameter can accept a , a , or a . + + + +## Examples + The following code example signs and verifies data. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.SignData2/CPP/example.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignData/example1.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.SignData2/VB/example.vb" id="Snippet1"::: + + ]]> + + The parameter is . + The parameter is not a valid type. + + Cryptographic Services + + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + The input stream to hash and sign. + The hash algorithm to use to create the hash value. + Computes the hash value of the specified input stream using the specified hash algorithm, and signs the resulting hash value. + The signature for the specified data. + + , a , or a . + + + +## Examples + The following code example signs and verifies data. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.SignData3/CPP/example.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignData/example2.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.SignData3/VB/example.vb" id="Snippet1"::: + + ]]> + + The parameter is . + The parameter is not a valid type. + + Cryptographic Services + + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + + + The input data to hash and sign. + The offset into the array from which to begin using data. + The number of bytes in the array to use as data. + The hash algorithm to use to create the hash value. + Computes the hash value of a subset of the specified byte array using the specified hash algorithm, and signs the resulting hash value. + The signature for the specified data. + + method. + + The `halg` parameter can accept a , a , or a . The string value can be one of the following: + +- The object identifier (OID) friendly name of the hash algorithm to use, either a name registered in the crypto config file or one in the Crypto API OID table. + +- The OID value. The OID must be one recognized by the Crypto API. + + For example, you could use SignData(new byte[5], "1.3.14.3.2.26") or SignData(new byte[5], "sha1"), or SignData(new byte[5], "SHA1"). + + + +## Examples + The following code example signs and verifies data. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.SignData1/CPP/example.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignData/example.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.SignData1/VB/example.vb" id="Snippet1"::: + + ]]> + + The parameter is . + The parameter is not a valid type. + + Cryptographic Services + + + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + + + Computes the signature for the specified hash value. + + + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Byte[] + + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + The hash value of the data to be signed. + The hash algorithm identifier (OID) used to create the hash value of the data. + Computes the signature for the specified hash value. + The signature for the specified hash value. + + method. + + The valid hash algorithms are and . The algorithm identifier can be derived from the hash name by using the method. + + Due to collision problems with SHA1 and MD5, Microsoft recommends a security model based on SHA256 or better. + +## Examples + The following code example encrypts some data, creates a hash of the encrypted data, and then signs hash with a digital signature. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/CPP/class1.cpp" id="Snippet1"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignHash/class1.cs" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/VB/class1.vb" id="Snippet1"::: + + ]]> + + The parameter is . + The cryptographic service provider (CSP) cannot be acquired. + + -or- + + There is no private key. + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + + + The hash value of the data to be signed. + The hash algorithm name used to create the hash value of the data. + The padding. + Computes the signature for the specified hash value using the specified padding. + The signature for the specified hash value. + To be added. + + is or . + + is . + + -or- + + is . + + does not equal . + + + + + + + + + + Property + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + Gets or sets a value indicating whether the key should be persisted in the computer's key store instead of the user profile store. + + if the key should be persisted in the computer key store; otherwise, . + + flag to a object. The property applies to all code in the current application domain, whereas the object applies only to classes that explicitly reference it. These settings are useful when impersonating or running under an account whose user profile is not loaded. Setting affects the key store location only if is initialized with no parameters. + + + +## Examples + The following code example creates an object and sets the static property to use the machine key store instead of the user profile key store. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Cryptography.RSACSP.UseMachineKey/CPP/example2.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/UseMachineKeyStore/example2.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Cryptography.RSACSP.UseMachineKey/VB/example2.vb" id="Snippet2"::: + + ]]> + + Cryptographic Services + + + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + + + Verifies that a digital signature is valid. + + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + + The data that was signed. + The name of the hash algorithm used to create the hash value of the data. + The signature data to be verified. + Verifies that a digital signature is valid by determining the hash value in the signature using the provided public key and comparing it to the hash value of the provided data. + + if the signature is valid; otherwise, . + + digital signature produced by the method. The signature is verified by obtaining the hash value from the signature using the public key it was signed with, and comparing that value to the hash value of the provided data. + + The `halg` parameter can accept a , a , or a . + + + +## Examples + The following example shows how to use the method to verify a signature. This code example is part of a larger example provided for the method. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/CPP/class1.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignHash/class1.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/VB/class1.vb" id="Snippet2"::: + + ]]> + + The parameter is . + The parameter is not a valid type. + + Cryptographic Services + + + + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + + + Verifies that a digital signature is valid. + + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Boolean + + + + + + + + The hash value of the signed data. + The hash algorithm identifier (OID) used to create the hash value of the data. + The signature data to be verified. + Verifies that a digital signature is valid by determining the hash value in the signature using the provided public key and comparing it to the provided hash value. + + if the signature is valid; otherwise, . + + digital signature produced by the method. The signature is verified by obtaining the hash value from the signature using the public key it was signed with, and comparing that value to the hash value of the provided data. + + The valid hash algorithms are and . The algorithm identifier can be derived from the hash name by using the method. + + Due to collision problems with SHA1 and MD5, Microsoft recommends a security model based on SHA256 or better. + +## Examples + The following example shows how to use the method to verify a signature. This code example is part of a larger example provided for the method. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/CPP/class1.cpp" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography/RSACryptoServiceProvider/SignHash/class1.cs" id="Snippet2"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Security.Cryptography.RSACryptoServiceProvider ManualHash Example/VB/class1.vb" id="Snippet2"::: + + ]]> + + The parameter is . + + -or- + + The parameter is . + The cryptographic service provider (CSP) cannot be acquired. + + -or- + + The signature cannot be verified. + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Csp + 4.0.0.0 + 4.1.0.0 + 4.1.1.0 + 4.1.2.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + + + + + + The hash value of the signed data. + The signature data to be verified. + The hash algorithm name used to create the hash value. + The padding. + Verifies that a digital signature is valid by determining the hash value in the signature using the specified hashing algorithm and padding, and comparing it to the provided hash value. + + if the signature is valid; otherwise, . + To be added. + + is or . + + is . + + -or- + + is . + + does not equal . + + + + diff --git a/xml/System.Security.Cryptography/RSAEncryptionPadding.xml b/xml/System.Security.Cryptography/RSAEncryptionPadding.xml index b29e9d60eae..e994f4ccc31 100644 --- a/xml/System.Security.Cryptography/RSAEncryptionPadding.xml +++ b/xml/System.Security.Cryptography/RSAEncryptionPadding.xml @@ -1,884 +1,887 @@ - - - - - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.Object - - - - System.IEquatable<System.Security.Cryptography.RSAEncryptionPadding> - - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - Specifies the padding mode and parameters to use with RSA encryption or decryption operations. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.RSAEncryptionPadding - - - - - - The hash algorithm. - Creates a new instance whose is with the given hash algorithm. - An object whose mode is is with the hash algorithm specified by . - To be added. - The property of is either or . - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - - - Compares two objects for equality. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.Boolean - - - - - - [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] - [<System.Diagnostics.CodeAnalysis.NotNullWhen(true)>] - - - - - - The object to compare. - Determines whether the current instance is equal to the specified object. - - if is equal to the current instance; otherwise, . - - object and the two objects have identical and property values. - - ]]> - - - - - - - - - - - - Method - - M:System.IEquatable`1.Equals(`0) - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.Boolean - - - - - - [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] - [<System.Diagnostics.CodeAnalysis.NotNullWhen(true)>] - - - - - - The object to compare. - Determines whether the current instance is equal to the specified object. - - if is equal to the current instance; otherwise, . - - and property values. - - ]]> - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - - Returns the hash code of this object. - The hash code of this instance. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.RSAEncryptionPaddingMode - - - Gets the padding mode represented by this instance. - A padding mode. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.HashAlgorithmName - - - Gets the hash algorithm used in conjunction with the padding mode. - The hash algorithm. - - property is not , then will be `null`. - - ]]> - - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.RSAEncryptionPadding - - - Gets an object that represents the Optimal Asymmetric Encryption Padding (OAEP) encryption standard with a SHA1 hash algorithm. - An object that represents the OAEP encryption standard with a SHA1 hash algorithm. - Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better. - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.RSAEncryptionPadding - - - Gets an object that represents the Optimal Asymmetric Encryption Padding (OAEP) encryption standard with a SHA256 hash algorithm. - An object that represents the OAEP encryption standard with a SHA256 hash algorithm. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Security.Cryptography.RSAEncryptionPadding - - - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Security.Cryptography.RSAEncryptionPadding - - - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.Security.Cryptography.RSAEncryptionPadding - - - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.RSAEncryptionPadding - - - Gets an object that represents the Optimal Asymmetric Encryption Padding (OAEP) encryption standard with a SHA-384 hash algorithm. - An object that represents the OAEP encryption standard with a SHA384 hash algorithm. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.RSAEncryptionPadding - - - Gets an object that represents the Optimal Asymmetric Encryption Padding (OAEP) encryption standard with a SHA512 hash algorithm. - An object that represents the OAEP encryption standard with a SHA512 hash algorithm. - To be added. - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.Boolean - - - - - - - The first object to compare. - The second object to compare. - Indicates whether two specified objects are equal. - - if and are equal; otherwise, . - - objects are equal if their and property values are equal. - - ]]> - - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.Boolean - - - - - - - The first object to compare. - The second object to compare. - Indicates whether two specified objects are unequal. - - if and are not equal; otherwise, . - - objects are not equal if their and property values are not equal. - - ]]> - - - - - - - - - - - Property - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.RSAEncryptionPadding - - - Gets an object that represents the PKCS #1 encryption standard. - An object that represents the PKCS #1 encryption standard. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.String - - - - Returns the string representation of the current instance. - The string representation of the current object. - - object is the concatenation of its and `OaepHashAlgorithm.Name` properties. - - ]]> - - - - - + + + + + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.Object + + + + System.IEquatable<System.Security.Cryptography.RSAEncryptionPadding> + + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Specifies the padding mode and parameters to use with RSA encryption or decryption operations. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.RSAEncryptionPadding + + + + + + The hash algorithm. + Creates a new instance whose is with the given hash algorithm. + An object whose mode is is with the hash algorithm specified by . + To be added. + The property of is either or . + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + + + Compares two objects for equality. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.Boolean + + + + + + [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] + [<System.Diagnostics.CodeAnalysis.NotNullWhen(true)>] + + + + + + The object to compare. + Determines whether the current instance is equal to the specified object. + + if is equal to the current instance; otherwise, . + + object and the two objects have identical and property values. + + ]]> + + + + + + + + + + + + Method + + M:System.IEquatable`1.Equals(`0) + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.Boolean + + + + + + [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] + [<System.Diagnostics.CodeAnalysis.NotNullWhen(true)>] + + + + + + The object to compare. + Determines whether the current instance is equal to the specified object. + + if is equal to the current instance; otherwise, . + + and property values. + + ]]> + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + + Returns the hash code of this object. + The hash code of this instance. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.RSAEncryptionPaddingMode + + + Gets the padding mode represented by this instance. + A padding mode. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.HashAlgorithmName + + + Gets the hash algorithm used in conjunction with the padding mode. + The hash algorithm. + + property is not , then will be `null`. + + ]]> + + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.RSAEncryptionPadding + + + Gets an object that represents the Optimal Asymmetric Encryption Padding (OAEP) encryption standard with a SHA1 hash algorithm. + An object that represents the OAEP encryption standard with a SHA1 hash algorithm. + Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better. + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.RSAEncryptionPadding + + + Gets an object that represents the Optimal Asymmetric Encryption Padding (OAEP) encryption standard with a SHA256 hash algorithm. + An object that represents the OAEP encryption standard with a SHA256 hash algorithm. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Security.Cryptography.RSAEncryptionPadding + + + + mode with SHA3-256 hash algorithm. + To be added. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Security.Cryptography.RSAEncryptionPadding + + + + mode with SHA3-384 hash algorithm. + To be added. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.Security.Cryptography.RSAEncryptionPadding + + + + mode with SHA3-512 hash algorithm. + To be added. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.RSAEncryptionPadding + + + Gets an object that represents the Optimal Asymmetric Encryption Padding (OAEP) encryption standard with a SHA-384 hash algorithm. + An object that represents the OAEP encryption standard with a SHA384 hash algorithm. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.RSAEncryptionPadding + + + Gets an object that represents the Optimal Asymmetric Encryption Padding (OAEP) encryption standard with a SHA512 hash algorithm. + An object that represents the OAEP encryption standard with a SHA512 hash algorithm. + To be added. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.Boolean + + + + + + + The first object to compare. + The second object to compare. + Indicates whether two specified objects are equal. + + if and are equal; otherwise, . + + objects are equal if their and property values are equal. + + ]]> + + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.Boolean + + + + + + + The first object to compare. + The second object to compare. + Indicates whether two specified objects are unequal. + + if and are not equal; otherwise, . + + objects are not equal if their and property values are not equal. + + ]]> + + + + + + + + + + + Property + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.RSAEncryptionPadding + + + Gets an object that represents the PKCS #1 encryption standard. + An object that represents the PKCS #1 encryption standard. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.String + + + + Returns the string representation of the current instance. + The string representation of the current object. + + object is the concatenation of its and `OaepHashAlgorithm.Name` properties. + + ]]> + + + + + diff --git a/xml/System.Security.Cryptography/RandomNumberGenerator.xml b/xml/System.Security.Cryptography/RandomNumberGenerator.xml index cf8b1d28d33..2a8cbd58472 100644 --- a/xml/System.Security.Cryptography/RandomNumberGenerator.xml +++ b/xml/System.Security.Cryptography/RandomNumberGenerator.xml @@ -1,1135 +1,1151 @@ - - - - - - - - - - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - - - - - System.Object - - - - System.IDisposable - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - [System.Runtime.InteropServices.ComVisible(true)] - [<System.Runtime.InteropServices.ComVisible(true)>] - - - - Provides functionality for generating random values. - - - - Cryptographic Services - - - - - - - - - - - - - Constructor - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - Initializes a new instance of . - - . - - ]]> - - Cryptographic Services - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - - - Creates an instance of an implementation of a cryptographic random number generator. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.RandomNumberGenerator - - - - Creates an instance of the default implementation of a cryptographic random number generator that can be used to generate random data. - A new instance of a cryptographic random number generator. - To be added. - Cryptographic Services - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] - [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>] - - - [System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] - [<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] - - - [System.Security.SecuritySafeCritical] - [<System.Security.SecuritySafeCritical>] - - - - System.Security.Cryptography.RandomNumberGenerator - - - - - - The name of the random number generator implementation to use. - Creates an instance of the specified implementation of a cryptographic random number generator. - A new instance of a cryptographic random number generator. - To be added. - Cryptographic Services - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - - - When overridden in a derived class, releases the unmanaged resources used by the current instance of the class. - - - - - - - - - - Method - - M:System.IDisposable.Dispose - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - When overridden in a derived class, releases all resources used by the current instance of the class. - - . The `Dispose` method leaves the in an unusable state. After calling `Dispose`, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. - - For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - -> [!NOTE] -> Always call `Dispose` before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. - - ]]> - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - to release both managed and unmanaged resources; to release only unmanaged resources. - When overridden in a derived class, releases the unmanaged resources used by the and optionally releases the managed resources. - - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - - ]]> - - - - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - The span to fill with cryptographically strong random bytes. - Fills a span with cryptographically strong random bytes. - To be added. - - - - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - - - Fills an array of bytes with a cryptographically strong random sequence of values. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.0.0.0 - 4.1.0.0 - 4.2.0.0 - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The array to fill with cryptographically strong random bytes. - When overridden in a derived class, fills an array of bytes with a cryptographically strong random sequence of values. - - - - Cryptographic Services - - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 6.0.0.0 - - - mscorlib - - - netstandard - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Byte[] - - - - - - The number of bytes of random values to create. - Creates an array of bytes with a cryptographically strong random sequence of values. - An array populated with cryptographically strong random values. - To be added. - - is less than zero. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - The span to fill with cryptographically strong random bytes. - Fills a span with cryptographically strong random bytes. - To be added. - - - - - - - - - - - Method - - mscorlib - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - - - The array to fill with cryptographically strong random bytes. - The index of the array to start the fill operation. - The number of bytes to fill. - Fills the specified byte array with a cryptographically strong random sequence of values. - To be added. - - is . - - or is less than 0 - - plus exceeds the length of . - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - System.String - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - - - - The exclusive upper bound of the random range. - Generates a random integer between 0 (inclusive) and a specified exclusive upper bound using a cryptographically strong random number generator. - A random integer between 0 (inclusive) and (exclusive). - - . - - This method uses a discard-and-retry strategy to avoid the low value bias that a simple modular arithmetic operation would produce. - - ]]> - - The parameter is less than or equal to 0. - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Int32 - - - - - - - The inclusive lower bound of the random range. - The exclusive upper bound of the random range. - Generates a random integer between a specified inclusive lower bound and a specified exclusive upper bound using a cryptographically strong random number generator. - A random integer between (inclusive) and (exclusive). - - . - - This method uses a discard-and-retry strategy to avoid the low value bias that a simple modular arithmetic operation would produce. - - Negative values are permitted for both `fromInclusive` and `toExclusive`. - - ]]> - - The parameter is less than or equal to the parameter. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - T[] - - - - - - [System.Runtime.CompilerServices.Nullable(2)] - [<System.Runtime.CompilerServices.Nullable(2)>] - - - - - - - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.Void - - - - - - - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - - - - - Method - - mscorlib - 1.0.5000.0 - 2.0.0.0 - 2.0.5.0 - 4.0.0.0 - - - netstandard - 2.0.0.0 - 2.1.0.0 - - - System.Security.Cryptography.Algorithms - 4.3.0.0 - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Void - - - - - - The array to fill with cryptographically strong random nonzero bytes. - When overridden in a derived class, fills an array of bytes with a cryptographically strong random sequence of nonzero values. - - - - Cryptographic Services - - - - - - - - - - Method - - System.Security.Cryptography.Algorithms - 4.3.1.0 - 4.3.2.0 - 5.0.0.0 - 6.0.0.0 - - - netstandard - 2.1.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.Void - - - - - - The span to fill with cryptographically strong random nonzero bytes. - Fills a byte span with a cryptographically strong random sequence of nonzero values. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(0)] - [<System.Runtime.CompilerServices.NullableContext(0)>] - - - - System.String - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.Algorithms - - - netstandard - - - - [System.Runtime.CompilerServices.NullableContext(2)] - [<System.Runtime.CompilerServices.NullableContext(2)>] - - - - System.Void - - - - - - - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - + + + + + + + + + + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + + + + + System.Object + + + + System.IDisposable + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + [System.Runtime.InteropServices.ComVisible(true)] + [<System.Runtime.InteropServices.ComVisible(true)>] + + + + Provides functionality for generating random values. + + + + Cryptographic Services + + + + + + + + + + + + + Constructor + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + Initializes a new instance of . + + . + + ]]> + + Cryptographic Services + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + + + Creates an instance of an implementation of a cryptographic random number generator. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.RandomNumberGenerator + + + + Creates an instance of the default implementation of a cryptographic random number generator that can be used to generate random data. + A new instance of a cryptographic random number generator. + To be added. + Cryptographic Services + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")] + [<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>] + + + [System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")] + [<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>] + + + [System.Security.SecuritySafeCritical] + [<System.Security.SecuritySafeCritical>] + + + + System.Security.Cryptography.RandomNumberGenerator + + + + + + The name of the random number generator implementation to use. + Creates an instance of the specified implementation of a cryptographic random number generator. + A new instance of a cryptographic random number generator. + To be added. + Cryptographic Services + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + + + When overridden in a derived class, releases the unmanaged resources used by the current instance of the class. + + + + + + + + + + Method + + M:System.IDisposable.Dispose + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + When overridden in a derived class, releases all resources used by the current instance of the class. + + . The `Dispose` method leaves the in an unusable state. After calling `Dispose`, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. + + For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + +> [!NOTE] +> Always call `Dispose` before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. + + ]]> + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + to release both managed and unmanaged resources; to release only unmanaged resources. + When overridden in a derived class, releases the unmanaged resources used by the and optionally releases the managed resources. + + method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + + ]]> + + + + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + + For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + The span to fill with cryptographically strong random bytes. + Fills a span with cryptographically strong random bytes. + To be added. + + + + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + + + Fills an array of bytes with a cryptographically strong random sequence of values. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.0.0.0 + 4.1.0.0 + 4.2.0.0 + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The array to fill with cryptographically strong random bytes. + When overridden in a derived class, fills an array of bytes with a cryptographically strong random sequence of values. + + + + Cryptographic Services + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 6.0.0.0 + + + mscorlib + + + netstandard + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Byte[] + + + + + + The number of bytes of random values to create. + Creates an array of bytes with a cryptographically strong random sequence of values. + An array populated with cryptographically strong random values. + To be added. + + is less than zero. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + The span to fill with cryptographically strong random bytes. + Fills a span with cryptographically strong random bytes. + To be added. + + + + + + + + + + + Method + + mscorlib + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + + + The array to fill with cryptographically strong random bytes. + The index of the array to start the fill operation. + The number of bytes to fill. + Fills the specified byte array with a cryptographically strong random sequence of values. + To be added. + + is . + + or is less than 0 + + plus exceeds the length of . + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + System.String + + + + + + + The length of string to create. + + if the hexadecimal characters should be lowercase; if they should be uppercase. + The default is . + Creates a string filled with cryptographically random hexadecimal characters. + A string populated with random hexadecimal characters. + The behavior of this is the same as using and specifying hexadecimal characters as the choices. This implementation is optimized specifically for hexadecimal characters. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + + The buffer to receive the characters. + + if the hexadecimal characters should be lowercase; if they should be uppercase. + The default is . + Fills a buffer with cryptographically random hexadecimal characters. + The behavior of this is the same as using and specifying hexadecimal characters as the choices. This implementation is optimized specifically for hexadecimal characters. + + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + + + + The exclusive upper bound of the random range. + Generates a random integer between 0 (inclusive) and a specified exclusive upper bound using a cryptographically strong random number generator. + A random integer between 0 (inclusive) and (exclusive). + + . + + This method uses a discard-and-retry strategy to avoid the low value bias that a simple modular arithmetic operation would produce. + + ]]> + + The parameter is less than or equal to 0. + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Int32 + + + + + + + The inclusive lower bound of the random range. + The exclusive upper bound of the random range. + Generates a random integer between a specified inclusive lower bound and a specified exclusive upper bound using a cryptographically strong random number generator. + A random integer between (inclusive) and (exclusive). + + . + + This method uses a discard-and-retry strategy to avoid the low value bias that a simple modular arithmetic operation would produce. + + Negative values are permitted for both `fromInclusive` and `toExclusive`. + + ]]> + + The parameter is less than or equal to the parameter. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + T[] + + + + + + [System.Runtime.CompilerServices.Nullable(2)] + [<System.Runtime.CompilerServices.Nullable(2)>] + + + + + + + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + The type of items. + The items to use to populate the array. + The length of array to return populated with items. + Creates an array populated with items chosen at random from choices. + An array populated with random choices. + To be added. + + is empty. + + is not zero or a positive number. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.Void + + + + + + + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + The type of items. + The items to use to fill the buffer. + The buffer to receive the items. + Fills the elements of a specified span with items chosen at random from the provided set of choices. + To be added. + + is empty. + + + + + + + + + + + + + + Method + + mscorlib + 1.0.5000.0 + 2.0.0.0 + 2.0.5.0 + 4.0.0.0 + + + netstandard + 2.0.0.0 + 2.1.0.0 + + + System.Security.Cryptography.Algorithms + 4.3.0.0 + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Void + + + + + + The array to fill with cryptographically strong random nonzero bytes. + When overridden in a derived class, fills an array of bytes with a cryptographically strong random sequence of nonzero values. + + + + Cryptographic Services + + + + + + + + + + Method + + System.Security.Cryptography.Algorithms + 4.3.1.0 + 4.3.2.0 + 5.0.0.0 + 6.0.0.0 + + + netstandard + 2.1.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.Void + + + + + + The span to fill with cryptographically strong random nonzero bytes. + Fills a byte span with a cryptographically strong random sequence of nonzero values. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(0)] + [<System.Runtime.CompilerServices.NullableContext(0)>] + + + + System.String + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + The characters to use to populate the string. + The length of string to return. + Creates a string populated with characters chosen at random from choices. + A string populated with random choices. + To be added. + + is empty. + + is not zero or a positive number. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.Algorithms + + + netstandard + + + + [System.Runtime.CompilerServices.NullableContext(2)] + [<System.Runtime.CompilerServices.NullableContext(2)>] + + + + System.Void + + + + + + + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + The type of span. + The span to shuffle. + Performs an in-place shuffle of a span using cryptographically random number generation. + To be added. + + + + diff --git a/xml/System.Security.Cryptography/SHA3_256.xml b/xml/System.Security.Cryptography/SHA3_256.xml index fbccfeb142f..e8b9de94961 100644 --- a/xml/System.Security.Cryptography/SHA3_256.xml +++ b/xml/System.Security.Cryptography/SHA3_256.xml @@ -1,386 +1,435 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.HashAlgorithm - - - - To be added. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.SHA3_256 - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Threading.Tasks.ValueTask<System.Int32> - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 256 - - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 32 - - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.HashAlgorithm + + + + Computes the SHA3-256 hash for the input data. + This algorithm is specified by FIPS 202. + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + Initializes a new instance of . + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.SHA3_256 + + + + Creates an instance of the default implementation of . + A new instance of . + To be added. + The platform does not support SHA3-256. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The data to hash. + Computes the hash of data using the SHA3-256 algorithm. + The hash of the data. + To be added. + + is . + The platform does not support SHA3-256. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The stream to hash. + Computes the hash of a stream using the SHA3-256 algorithm. + The hash of the data. + To be added. + + is . + + does not support reading. + The platform does not support SHA3-256. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The data to hash. + Computes the hash of data using the SHA3-256 algorithm. + The hash of the data. + To be added. + The platform does not support SHA3-256. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The stream to hash. + The buffer to receive the hash value. + Computes the hash of a stream using the SHA3-256 algorithm. + The total number of bytes written to . + To be added. + + is . + +

+ The buffer in is too small to hold the calculated hash + size. The SHA3-256 algorithm always produces a 256-bit hash, or 32 bytes. +

+

-or-

+

+ does not support reading. +

+
+ The platform does not support SHA3-256. +
+
+ + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + + + + + + The data to hash. + The buffer to receive the hash value. + Computes the hash of data using the SHA3-256 algorithm. + The total number of bytes written to . + To be added. + The buffer in is too small to hold the calculated hash + size. The SHA3-256 algorithm always produces a 256-bit hash, or 32 bytes. + The platform does not support SHA3-256. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + The stream to hash. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHA3-256 algorithm. + The hash of the data. + To be added. + + is . + + does not support reading. + The platform does not support SHA3-256. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Threading.Tasks.ValueTask<System.Int32> + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The stream to hash. + The buffer to receive the hash value. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHA3-256 algorithm. + The total number of bytes written to . + To be added. + + is . + +

+ The buffer in is too small to hold the calculated hash + size. The SHA3-256 algorithm always produces a 256-bit hash, or 32 bytes. +

+

-or-

+

+ does not support reading. +

+
+ The platform does not support SHA3-256. +
+
+ + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 256 + + The hash size produced by the SHA3-256 algorithm, in bits. + To be added. + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 32 + + The hash size produced by the SHA3-256 algorithm, in bytes. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the algorithm is supported on the current platform. + + if the algorithm is supported; otherwise, . + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + + + + + + The data to hash. + The buffer to receive the hash value. + When this method returns, the total number of bytes written into . + Attempts to compute the hash of data using the SHA3-256 algorithm. + + if is too small to hold the calculated hash, otherwise. + To be added. + The platform does not support SHA3-256. + + +
+
diff --git a/xml/System.Security.Cryptography/SHA3_384.xml b/xml/System.Security.Cryptography/SHA3_384.xml index 6f2b2194857..c9d03275d70 100644 --- a/xml/System.Security.Cryptography/SHA3_384.xml +++ b/xml/System.Security.Cryptography/SHA3_384.xml @@ -1,386 +1,433 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.HashAlgorithm - - - - To be added. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.SHA3_384 - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Threading.Tasks.ValueTask<System.Int32> - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 384 - - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 48 - - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.HashAlgorithm + + + + Computes the SHA3-384 hash for the input data. + This algorithm is specified by FIPS 202. + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + Initializes a new instance of . + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.SHA3_384 + + + + Creates an instance of the default implementation of . + A new instance of . + To be added. + The platform does not support SHA3-384. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The data to hash. + Computes the hash of data using the SHA3-384 algorithm. + The hash of the data. + To be added. + + is . + The platform does not support SHA3-384. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The stream to hash. + Computes the hash of a stream using the SHA3-384 algorithm. + The hash of the data. + To be added. + + is . + + does not support reading. + The platform does not support SHA3-384. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The data to hash. + Computes the hash of data using the SHA3-384 algorithm. + The hash of the data. + To be added. + The platform does not support SHA3-384. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The stream to hash. + The buffer to receive the hash value. + Computes the hash of a stream using the SHA3-384 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated hash + size. The SHA3-384 algorithm always produces a 384-bit hash, or 48 bytes. + +-or- + + does not support reading. + + The platform does not support SHA3-384. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + + + + + + The data to hash. + The buffer to receive the hash value. + Computes the hash of data using the SHA3-384 algorithm. + The total number of bytes written to . + To be added. + The buffer in is too small to hold the calculated hash + size. The SHA3-384 algorithm always produces a 384-bit hash, or 48 bytes. + The platform does not support SHA3-384. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + The stream to hash. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHA3-384 algorithm. + The hash of the data. + To be added. + + is . + + does not support reading. + The platform does not support SHA3-384. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Threading.Tasks.ValueTask<System.Int32> + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The stream to hash. + The buffer to receive the hash value. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHA3-384 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated hash + size. The SHA3-384 algorithm always produces a 384-bit hash, or 48 bytes. + +-or- + + does not support reading. + + The platform does not support SHA3-384. + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 384 + + The hash size produced by the SHA3-384 algorithm, in bits. + To be added. + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 48 + + The hash size produced by the SHA3-384 algorithm, in bytes. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the algorithm is supported on the current platform. + + if the algorithm is supported; otherwise, . + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + + + + + + The data to hash. + The buffer to receive the hash value. + When this method returns, the total number of bytes written into . + Attempts to compute the hash of data using the SHA3-384 algorithm. + + if is too small to hold the calculated hash, otherwise. + To be added. + The platform does not support SHA3-384. + + + + diff --git a/xml/System.Security.Cryptography/SHA3_512.xml b/xml/System.Security.Cryptography/SHA3_512.xml index dddfdae11c6..d1428b8ea8a 100644 --- a/xml/System.Security.Cryptography/SHA3_512.xml +++ b/xml/System.Security.Cryptography/SHA3_512.xml @@ -1,386 +1,433 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.HashAlgorithm - - - - To be added. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Security.Cryptography.SHA3_512 - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Threading.Tasks.ValueTask<System.Int32> - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 512 - - To be added. - To be added. - - - - - - - - - - Field - - System.Security.Cryptography - 8.0.0.0 - - - System.Int32 - - 64 - - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.HashAlgorithm + + + + Computes the SHA3-512 hash for the input data. + This algorithm is specified by FIPS 202. + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + Initializes a new instance of . + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Security.Cryptography.SHA3_512 + + + + Creates an instance of the default implementation of . + A new instance of . + To be added. + The platform does not support SHA3-512. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The data to hash. + Computes the hash of data using the SHA3-512 algorithm. + The hash of the data. + To be added. + + is . + The platform does not support SHA3-512. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The stream to hash. + Computes the hash of a stream using the SHA3-512 algorithm. + The hash of the data. + To be added. + + is . + + does not support reading. + The platform does not support SHA3-512. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The data to hash. + Computes the hash of data using the SHA3-512 algorithm. + The hash of the data. + To be added. + The platform does not support SHA3-512. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The stream to hash. + The buffer to receive the hash value. + Computes the hash of a stream using the SHA3-512 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated hash + size. The SHA3-512 algorithm always produces a 512-bit hash, or 64 bytes. + +-or- + + does not support reading. + + The platform does not support SHA3-512. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + + + + + + The data to hash. + The buffer to receive the hash value. + Computes the hash of data using the SHA3-512 algorithm. + The total number of bytes written to . + To be added. + The buffer in is too small to hold the calculated hash + size. The SHA3-512 algorithm always produces a 512-bit hash, or 64 bytes. + The platform does not support SHA3-512. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + The stream to hash. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHA3-512 algorithm. + The hash of the data. + To be added. + + is . + + does not support reading. + The platform does not support SHA3-512. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Threading.Tasks.ValueTask<System.Int32> + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The stream to hash. + The buffer to receive the hash value. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHA3-512 algorithm. + The total number of bytes written to . + To be added. + + is . + + + The buffer in is too small to hold the calculated hash + size. The SHA3-512 algorithm always produces a 512-bit hash, or 64 bytes. + +-or- + + does not support reading. + + The platform does not support SHA3-512. + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 512 + + The hash size produced by the SHA3-512 algorithm, in bits. + To be added. + + + + + + + + + + Field + + System.Security.Cryptography + 8.0.0.0 + + + System.Int32 + + 64 + + The hash size produced by the SHA3-512 algorithm, in bytes. + To be added. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the algorithm is supported on the current platform. + + if the algorithm is supported; otherwise, . + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + + + + + + The data to hash. + The buffer to receive the hash value. + When this method returns, the total number of bytes written into . + Attempts to compute the hash of data using the SHA3-512 algorithm. + + if is too small to hold the calculated hash, otherwise. + To be added. + The platform does not support SHA3-512. + + + + diff --git a/xml/System.Security.Cryptography/SP800108HmacCounterKdf.xml b/xml/System.Security.Cryptography/SP800108HmacCounterKdf.xml index 65d699a1a0c..9ca4cf76027 100644 --- a/xml/System.Security.Cryptography/SP800108HmacCounterKdf.xml +++ b/xml/System.Security.Cryptography/SP800108HmacCounterKdf.xml @@ -1,518 +1,687 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Object - - - - System.IDisposable - - - - To be added. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - M:System.IDisposable.Dispose - - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Object + + + + System.IDisposable + + + + NIST SP 800-108 HMAC CTR Key-Based Key Derivation (KBKDF) + + This implements NIST SP 800-108 HMAC in counter mode. The implemented KDF assumes the form of PRF (KI, [i]2 || Label || 0x00 || Context || [L]2) where [i]2 and [L]2 are encoded as unsigned 32-bit integers, big endian. + + All members of this class are thread safe. If the instance is disposed of while other threads are using the instance, those threads will either receive an or produce a valid derived key. + + + + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + + + + + The key-derivation key. + The HMAC algorithm. + Initializes a new instance of using a specified key and HMAC algorithm. + To be added. + + has a which is . + +-or- + + is . + + + has a which is empty. + + is not a known or supported hash algorithm. + The current platform does not have a supported implementation of HMAC. + + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + + + + The key-derivation key. + The HMAC algorithm. + Initializes a new instance of using a specified key and HMAC algorithm. + To be added. + + has a which is . + + has a which is empty. + + is not a known or supported hash algorithm. + The current platform does not have a supported implementation of HMAC. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + + + + + The key-derivation key. + The HMAC algorithm. + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The length of the derived key, in bytes. + Derives a key of a specified length. + An array containing the derived key. + To be added. + + is . + +-or- + + is . + +-or- + + is . + +-or- + + has a which is . + + + has a which is empty. + + is negative or larger than the maximum number of bytes + that can be derived. + + is not a known or supported hash algorithm. + The current platform does not have a supported implementation of HMAC. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + + + + + The key-derivation key. + The HMAC algorithm. + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The length of the derived key, in bytes. + Derives a key of a specified length. + An array containing the derived key. + + and will be converted to bytes using the UTF-8 encoding. + for other encodings, perform the conversion using the desired encoding and use an overload which accepts the label and context as a sequence of bytes. + + is . + +-or- + + is . + +-or- + + is . + +-or- + + has a which is . + + + has a which is empty. + + is negative or larger than the maximum number of bytes + that can be derived. + + is not a known or supported hash algorithm. + + or contains text that cannot be converted to UTF-8. + The current platform does not have a supported implementation of HMAC. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + + + + The key-derivation key. + The HMAC algorithm. + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The length of the derived key, in bytes. + Derives a key of a specified length. + An array containing the derived key. + To be added. + + has a which is . + + has a which is empty. + + is negative or larger than the maximum number of bytes + that can be derived. + + is not a known or supported hash algorithm. + The current platform does not have a supported implementation of HMAC. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + + + + + The key-derivation key. + The HMAC algorithm. + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The buffer which will receive the derived key. + Fills a buffer with a derived key. + To be added. + + has a which is . + + has a which is empty. + + is larger than the maximum number of bytes that can be derived. + + is not a known or supported hash algorithm. + The current platform does not have a supported implementation of HMAC. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + + + + The key-derivation key. + The HMAC algorithm. + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The length of the derived key, in bytes. + Derives a key of a specified length. + An array containing the derived key. + + and will be converted to bytes using the UTF-8 encoding. + for other encodings, perform the conversion using the desired encoding and use an overload which accepts the label and context as a sequence of bytes. + + has a which is . + + has a which is empty. + + is negative or larger than the maximum number of bytes + that can be derived. + + is not a known or supported hash algorithm. + + or contains text that cannot be converted to UTF-8. + The current platform does not have a supported implementation of HMAC. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + + + + + The key-derivation key. + The HMAC algorithm. + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The buffer which will receive the derived key. + Fills a buffer with a derived key. + + and will be converted to bytes using the UTF-8 encoding. + for other encodings, perform the conversion using the desired encoding and use an overload which accepts the label and context as a sequence of bytes. + + has a which is . + + has a which is empty. + + is larger than the maximum number of bytes that can be derived. + + is not a known or supported hash algorithm. + + or contains text that cannot be converted to UTF-8. + The current platform does not have a supported implementation of HMAC. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + + + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The length of the derived key, in bytes. + Derives a key of a specified length. + An array containing the derived key. + To be added. + + is . + +-or- + + is . + + + is negative or larger than the maximum number of bytes + that can be derived. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The length of the derived key, in bytes. + Derives a key of a specified length. + An array containing the derived key. + To be added. + + is negative or larger than the maximum number of bytes + that can be derived. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + + + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The buffer which will receive the derived key. + Fills a buffer with a derived key. + To be added. + + is . + +-or- + + is . + + + is larger than the maximum number of bytes that can be derived. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The length of the derived key, in bytes. + Derives a key of a specified length. + An array containing the derived key. + + and will be converted to bytes using the UTF-8 encoding. + for other encodings, perform the conversion using the desired encoding and use an overload which accepts the label and context as a sequence of bytes. + + is negative or larger than the maximum number of bytes + that can be derived. + + or contains text that cannot be converted to UTF-8. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + + + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The buffer which will receive the derived key. + Fills a buffer with a derived key. + + and will be converted to bytes using the UTF-8 encoding. + for other encodings, perform the conversion using the desired encoding and use an overload which accepts the label and context as a sequence of bytes. + + is larger than the maximum number of bytes that can be derived. + + or contains text that cannot be converted to UTF-8. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + + + The label that identifies the purpose for the derived key. + The context containing information related to the derived key. + The length of the derived key, in bytes. + Derives a key of a specified length. + An array containing the derived key. + + and will be converted to bytes using the UTF-8 encoding. + for other encodings, perform the conversion using the desired encoding and use an overload which accepts the label and context as a sequence of bytes. + + is . + +-or- + + is . + + + is negative or larger than the maximum number of bytes + that can be derived. + + or contains text that cannot be converted to UTF-8. + + + + + + + + + + Method + + M:System.IDisposable.Dispose + + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + To be added. + + + + diff --git a/xml/System.Security.Cryptography/SafeEvpPKeyHandle.xml b/xml/System.Security.Cryptography/SafeEvpPKeyHandle.xml index 74b011751e4..a3608910607 100644 --- a/xml/System.Security.Cryptography/SafeEvpPKeyHandle.xml +++ b/xml/System.Security.Cryptography/SafeEvpPKeyHandle.xml @@ -1,427 +1,451 @@ - - - - - - - - - System.Security.Cryptography.OpenSsl - 4.0.0.0 - 4.1.1.0 - 4.1.2.0 - 4.1.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - - - - System.Runtime.InteropServices.SafeHandle - - - - - [System.Runtime.CompilerServices.Nullable(0)] - [<System.Runtime.CompilerServices.Nullable(0)>] - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - Represents the pointer type from OpenSSL. - - to perform interop with OpenSSL a caller must ensure that the version of OpenSSL they are calling is the same as the version the .NET runtime is calling, and not a side-by-side version. The version of OpenSSL that the runtime is calling can be determined by . - - ]]> - - - - - - - - - - Constructor - - System.Security.Cryptography.OpenSsl - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("android")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] - - - - - Initializes a new instance of the class, representing an invalid handle. - To be added. - - - - - - - - - - Constructor - - System.Security.Cryptography.OpenSsl - 4.0.0.0 - 4.1.1.0 - 4.1.2.0 - 4.1.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("android")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] - - - - - - - - The handle value to represent. - - to reliably let release the handle during the finalization phase; otherwise, (not recommended). - Initializes a new instance of the class with the specified handle value. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography.OpenSsl - 4.0.0.0 - 4.1.1.0 - 4.1.2.0 - 4.1.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Security.Cryptography.SafeEvpPKeyHandle - - - - Creates another instance of this type which has an independent lifetime but tracks the same resource. - Another instance of this type which has an independent lifetime but tracks the same resource. - To be added. - This handle is invalid. - - - - - - - - - - - Property - - System.Security.Cryptography.OpenSsl - 4.0.0.0 - 4.1.1.0 - 4.1.2.0 - 4.1.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - Gets a value indicating whether the handle value is invalid. - - if the handle value is invalid; otherwise, . - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.OpenSsl - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("android")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] - - - - System.Security.Cryptography.SafeEvpPKeyHandle - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Security.Cryptography.OpenSsl - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("android")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] - - - - System.Security.Cryptography.SafeEvpPKeyHandle - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography.OpenSsl - 4.1.2.0 - 4.1.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - - [System.Runtime.Versioning.UnsupportedOSPlatform("android")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] - - - [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] - [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] - - - - System.Int64 - - - Gets a value representing the version number as reported by the loaded version of OpenSSL. - A value representing the version number as reported by the loaded version of OpenSSL. - - to perform interop with OpenSSL a caller must ensure that the version of OpenSSL they are calling is the same as the version the .NET runtime is calling, and not a side-by-side version. - - For OpenSSL 1.1.0 and newer, this value is reported from the `OpenSSL_version_num()` function. When an older version of OpenSSL is in use, this value is reported from the `SSLeay()` function. - - Callers are encouraged to only perform an equality check with this value. - - ]]> - - - - - - - - - - - Method - - System.Security.Cryptography.OpenSsl - 4.0.0.0 - 4.1.1.0 - 4.1.2.0 - 4.1.3.0 - 5.0.0.0 - 6.0.0.0 - 7.0.0.0 - - - System.Security.Cryptography - 7.0.0.0 - 8.0.0.0 - - - System.Boolean - - - - Executes the code required to free the handle. - - in all cases. - To be added. - - - - + + + + + + + + + System.Security.Cryptography.OpenSsl + 4.0.0.0 + 4.1.1.0 + 4.1.2.0 + 4.1.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + + + + System.Runtime.InteropServices.SafeHandle + + + + + [System.Runtime.CompilerServices.Nullable(0)] + [<System.Runtime.CompilerServices.Nullable(0)>] + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + Represents the pointer type from OpenSSL. + + to perform interop with OpenSSL a caller must ensure that the version of OpenSSL they are calling is the same as the version the .NET runtime is calling, and not a side-by-side version. The version of OpenSSL that the runtime is calling can be determined by . + + ]]> + + + + + + + + + + Constructor + + System.Security.Cryptography.OpenSsl + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("android")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] + + + + + Initializes a new instance of the class, representing an invalid handle. + To be added. + + + + + + + + + + Constructor + + System.Security.Cryptography.OpenSsl + 4.0.0.0 + 4.1.1.0 + 4.1.2.0 + 4.1.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("android")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] + + + + + + + + The handle value to represent. + + to reliably let release the handle during the finalization phase; otherwise, (not recommended). + Initializes a new instance of the class with the specified handle value. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography.OpenSsl + 4.0.0.0 + 4.1.1.0 + 4.1.2.0 + 4.1.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Security.Cryptography.SafeEvpPKeyHandle + + + + Creates another instance of this type which has an independent lifetime but tracks the same resource. + Another instance of this type which has an independent lifetime but tracks the same resource. + To be added. + This handle is invalid. + + + + + + + + + + + Property + + System.Security.Cryptography.OpenSsl + 4.0.0.0 + 4.1.1.0 + 4.1.2.0 + 4.1.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + Gets a value indicating whether the handle value is invalid. + + if the handle value is invalid; otherwise, . + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.OpenSsl + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("android")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] + + + + System.Security.Cryptography.SafeEvpPKeyHandle + + + + + + + The name of the ENGINE to process the private key open request. + The name of the key to open. + Open a named private key using a named OpenSSL ENGINE. + The opened key. + + This operation will fail if OpenSSL cannot successfully load the named ENGINE, or if the named ENGINE cannot load the named key. + + Not all ENGINEs support loading private keys. + + The syntax for is determined by each individual ENGINE. + + + + or is . + + or is the empty string. + the key could not be opened via the specified ENGINE. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Security.Cryptography.OpenSsl + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("android")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] + + + + System.Security.Cryptography.SafeEvpPKeyHandle + + + + + + + The name of the ENGINE to process the public key open request. + The name of the key to open. + Open a named public key using a named OpenSSL ENGINE. + The opened key. + + This operation will fail if OpenSSL cannot successfully load the named ENGINE, or if the named ENGINE cannot load the named key. + + Not all ENGINEs support loading public keys, even ones that support loading private keys. + + The syntax for is determined by each individual ENGINE. + + + + or is . + + or is the empty string. + the key could not be opened via the specified ENGINE. + + + + + + + + + + Property + + System.Security.Cryptography.OpenSsl + 4.1.2.0 + 4.1.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + + [System.Runtime.Versioning.UnsupportedOSPlatform("android")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("android")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("browser")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>] + + + [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] + [<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>] + + + + System.Int64 + + + Gets a value representing the version number as reported by the loaded version of OpenSSL. + A value representing the version number as reported by the loaded version of OpenSSL. + + to perform interop with OpenSSL a caller must ensure that the version of OpenSSL they are calling is the same as the version the .NET runtime is calling, and not a side-by-side version. + + For OpenSSL 1.1.0 and newer, this value is reported from the `OpenSSL_version_num()` function. When an older version of OpenSSL is in use, this value is reported from the `SSLeay()` function. + + Callers are encouraged to only perform an equality check with this value. + + ]]> + + + + + + + + + + + Method + + System.Security.Cryptography.OpenSsl + 4.0.0.0 + 4.1.1.0 + 4.1.2.0 + 4.1.3.0 + 5.0.0.0 + 6.0.0.0 + 7.0.0.0 + + + System.Security.Cryptography + 7.0.0.0 + 8.0.0.0 + + + System.Boolean + + + + Executes the code required to free the handle. + + in all cases. + To be added. + + + + diff --git a/xml/System.Security.Cryptography/Shake128.xml b/xml/System.Security.Cryptography/Shake128.xml index a331990d304..a3582e69ba3 100644 --- a/xml/System.Security.Cryptography/Shake128.xml +++ b/xml/System.Security.Cryptography/Shake128.xml @@ -1,485 +1,546 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Object - - - - System.IDisposable - - - - To be added. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - M:System.IDisposable.Dispose - - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Threading.Tasks.ValueTask - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Object + + + + System.IDisposable + + + + Computes the SHAKE128 hash for the input data. + This algorithm is specified by FIPS 202. The SHAKE algorithm family is an extendable-output function (XOF) which allows the output to be extended to any length. The size of the XOF indicates the security strength of the algorithm, not the output size. + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + Initializes a new instance of the class. + To be added. + The platform does not support SHAKE128. Callers can use the property + to determine if the platform supports SHAKE128. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Void + + + + + + The data to process. + Appends the specified data to the data already processed in the hash. + To be added. + + is . + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + The data to process. + Appends the specified data to the data already processed in the hash. + To be added. + The object has already been disposed. + + + + + + + + + + Method + + M:System.IDisposable.Dispose + + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The size of the hash to produce. + Retrieves the hash for the data accumulated from prior calls to the AppendData methods, without resetting the object to its initial state. + The computed hash. + To be added. + + is negative. + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + The buffer to fill with the hash. + Fills the buffer with the hash for the data accumulated from prior calls to the AppendData methods, without resetting the object to its initial state. + To be added. + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The size of the hash to produce. + Retrieves the hash for the data accumulated from prior calls to the AppendData methods, and resets the object to its initial state. + The computed hash. + To be added. + + is negative. + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + The buffer to fill with the hash. + Fills the buffer with the hash for the data accumulated from prior calls to the AppendData methods, and resets the object to its initial state. + To be added. + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + + The data to hash. + The size of the hash to produce. + Computes the hash of data using the SHAKE128 algorithm. + The hash of the data. + To be added. + + is negative. + + is . + The platform does not support SHAKE128. Callers can use the property + to determine if the platform supports SHAKE128. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + + The stream to hash. + The size of the hash to produce. + Computes the hash of a stream using the SHAKE128 algorithm. + The hash of the data. + To be added. + + does not support reading. + + is negative. + + is . + The platform does not support SHAKE128. Callers can use the property + to determine if the platform supports SHAKE128. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The stream to hash. + The buffer to fill with the hash. + Computes the hash of a stream using the SHAKE128 algorithm. + To be added. + + does not support reading. + + is . + The platform does not support SHAKE128. Callers can use the property + to determine if the platform supports SHAKE128. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + The data to hash. + The size of the hash to produce. + Computes the hash of data using the SHAKE128 algorithm. + The hash of the data. + To be added. + + is negative. + The platform does not support SHAKE128. Callers can use the property + to determine if the platform supports SHAKE128. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + + The data to hash. + The buffer to fill with the hash. + Computes the hash of data using the SHAKE128 algorithm. + To be added. + The platform does not support SHAKE128. Callers can use the property + to determine if the platform supports SHAKE128. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + + The stream to hash. + The size of the hash to produce. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHAKE128 algorithm. + A that completes with the computed hash. + To be added. + + does not support reading. + + is negative. + + is . + + has been canceled. + The platform does not support SHAKE128. Callers can use the property + to determine if the platform supports SHAKE128. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Threading.Tasks.ValueTask + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The stream to hash. + The buffer to fill with the hash. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHAKE128 algorithm. + A that represents the asynchronous operation. + To be added. + + is . + + does not support reading. + + has been canceled. + The platform does not support SHAKE128. Callers can use the property + to determine if the platform supports SHAKE128. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the algorithm is supported on the current platform. + + if the algorithm is supported; otherwise, . + To be added. + + + + diff --git a/xml/System.Security.Cryptography/Shake256.xml b/xml/System.Security.Cryptography/Shake256.xml index 989bb5132a3..478e8901f60 100644 --- a/xml/System.Security.Cryptography/Shake256.xml +++ b/xml/System.Security.Cryptography/Shake256.xml @@ -1,485 +1,546 @@ - - - - - - - - - System.Security.Cryptography - 8.0.0.0 - - - System.Object - - - - System.IDisposable - - - - To be added. - To be added. - - - - - - - - - Constructor - - System.Security.Cryptography - 8.0.0.0 - - - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - M:System.IDisposable.Dispose - - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Byte[] - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Byte[] - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Void - - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - - [System.Runtime.CompilerServices.NullableContext(1)] - [<System.Runtime.CompilerServices.NullableContext(1)>] - - - - System.Threading.Tasks.ValueTask<System.Byte[]> - - - [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] - [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] - - - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - Method - - System.Security.Cryptography - 8.0.0.0 - - - System.Threading.Tasks.ValueTask - - - - - - [System.Runtime.CompilerServices.Nullable(1)] - [<System.Runtime.CompilerServices.Nullable(1)>] - - - - - - - - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - - - - - - - - - - Property - - System.Security.Cryptography - 8.0.0.0 - - - System.Boolean - - - To be added. - To be added. - To be added. - - - - + + + + + + + + + System.Security.Cryptography + 8.0.0.0 + + + System.Object + + + + System.IDisposable + + + + Computes the SHAKE256 hash for the input data. + This algorithm is specified by FIPS 202. The SHAKE algorithm family is an extendable-output function (XOF) which allows the output to be extended to any length. The size of the XOF indicates the security strength of the algorithm, not the output size. + + + + + + + + + Constructor + + System.Security.Cryptography + 8.0.0.0 + + + + Initializes a new instance of the class. + To be added. + The platform does not support SHAKE256. Callers can use the property + to determine if the platform supports SHAKE256. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Void + + + + + + The data to process. + Appends the specified data to the data already processed in the hash. + To be added. + + is . + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + The data to process. + Appends the specified data to the data already processed in the hash. + To be added. + The object has already been disposed. + + + + + + + + + + Method + + M:System.IDisposable.Dispose + + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + To be added. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The size of the hash to produce. + Retrieves the hash for the data accumulated from prior calls to the AppendData methods, without resetting the object to its initial state. + The computed hash. + To be added. + + is negative. + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + The buffer to fill with the hash. + Fills the buffer with the hash for the data accumulated from prior calls to the AppendData methods, without resetting the object to its initial state. + To be added. + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + The size of the hash to produce. + Retrieves the hash for the data accumulated from prior calls to the AppendData methods, and resets the object to its initial state. + The computed hash. + To be added. + + is negative. + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + The buffer to fill with the hash. + Fills the buffer with the hash for the data accumulated from prior calls to the AppendData methods, and resets the object to its initial state. + To be added. + The object has already been disposed. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + + The data to hash. + The size of the hash to produce. + Computes the hash of data using the SHAKE256 algorithm. + The hash of the data. + To be added. + + is negative. + + is . + The platform does not support SHAKE256. Callers can use the property + to determine if the platform supports SHAKE256. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Byte[] + + + + + + + The stream to hash. + The size of the hash to produce. + Computes the hash of a stream using the SHAKE256 algorithm. + The hash of the data. + To be added. + + does not support reading. + + is negative. + + is . + The platform does not support SHAKE256. Callers can use the property + to determine if the platform supports SHAKE256. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + The stream to hash. + The buffer to fill with the hash. + Computes the hash of a stream using the SHAKE256 algorithm. + To be added. + + does not support reading. + + is . + The platform does not support SHAKE256. Callers can use the property + to determine if the platform supports SHAKE256. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Byte[] + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + + The data to hash. + The size of the hash to produce. + Computes the hash of data using the SHAKE256 algorithm. + The hash of the data. + To be added. + + is negative. + The platform does not support SHAKE256. Callers can use the property + to determine if the platform supports SHAKE256. + + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Void + + + + + + + The data to hash. + The buffer to fill with the hash. + Computes the hash of data using the SHAKE256 algorithm. + To be added. + The platform does not support SHAKE256. Callers can use the property + to determine if the platform supports SHAKE256. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + + [System.Runtime.CompilerServices.NullableContext(1)] + [<System.Runtime.CompilerServices.NullableContext(1)>] + + + + System.Threading.Tasks.ValueTask<System.Byte[]> + + + [System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })] + [<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>] + + + + + + + + + + The stream to hash. + The size of the hash to produce. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHAKE256 algorithm. + A that completes with the computed hash. + To be added. + + does not support reading. + + is negative. + + is . + + has been canceled. + The platform does not support SHAKE256. Callers can use the property + to determine if the platform supports SHAKE256. + + + + + + + + + Method + + System.Security.Cryptography + 8.0.0.0 + + + System.Threading.Tasks.ValueTask + + + + + + [System.Runtime.CompilerServices.Nullable(1)] + [<System.Runtime.CompilerServices.Nullable(1)>] + + + + + + + + The stream to hash. + The buffer to fill with the hash. + The token to monitor for cancellation requests. + The default value is . + Asynchronously computes the hash of a stream using the SHAKE256 algorithm. + A that represents the asynchronous operation. + To be added. + + is . + + does not support reading. + + has been canceled. + The platform does not support SHAKE256. Callers can use the property + to determine if the platform supports SHAKE256. + + + + + + + + + + Property + + System.Security.Cryptography + 8.0.0.0 + + + System.Boolean + + + Gets a value that indicates whether the algorithm is supported on the current platform. + + if the algorithm is supported; otherwise, . + To be added. + + + +