Skip to content

Add missing documentation for S.S.Cryptography #4892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions xml/System.Security.Cryptography.Pkcs/ContentInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,12 @@
<Parameter Name="encodedMessage" Type="System.Byte[]" />
</Parameters>
<Docs>
<param name="encodedMessage">An array of byte values that represents the encoded <see cref="T:System.Security.Cryptography.Pkcs.ContentInfo" /> message from which to retrieve the outer content type.</param>
<summary>The <see cref="M:System.Security.Cryptography.Pkcs.ContentInfo.GetContentType(System.Byte[])" /> static method retrieves the outer content type of the encoded <see cref="T:System.Security.Cryptography.Pkcs.ContentInfo" /> message represented by an array of byte values.</summary>
<returns>If the method succeeds, the method returns an <see cref="T:System.Security.Cryptography.Oid" /> object that contains the outer content type of the specified encoded <see cref="T:System.Security.Cryptography.Pkcs.ContentInfo" /> message.

If the method fails, it throws an exception.</returns>
<param name="encodedMessage">An array of byte values that represents the encoded CMS ContentInfo message from which to retrieve the outer content type.</param>
<summary>Retrieves the outer content type of an encoded CMS ContentInfo message.</summary>
<returns>The outer content type of the specified encoded CMS ContentInfo message.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">A null reference was passed to a method that does not accept it as a valid argument.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">An error occurred during a cryptographic operation.</exception>
<exception cref="T:System.ArgumentNullException"><paramref name="encodedMessage" /> is <see langword="null" />.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException"><paramref name="encodedMessage" /> cannot be decoded as a valid CMS ContentInfo value.</exception>
</Docs>
</Member>
<Member MemberName="GetContentType">
Expand All @@ -312,10 +310,11 @@
<Parameter Name="encodedMessage" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="dotnet-plat-ext-5.0;net-5.0" />
</Parameters>
<Docs>
<param name="encodedMessage">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="encodedMessage">A read-only span of byte values that represents the encoded CMS ContentInfo message from which to retrieve the outer content type.</param>
<summary>Retrieves the outer content type of an encoded CMS ContentInfo message.</summary>
<returns>The outer content type of the specified encoded CMS ContentInfo message.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException"><paramref name="encodedMessage" /> cannot be decoded as a valid CMS ContentInfo value.</exception>
</Docs>
</Member>
</Members>
Expand Down
13 changes: 8 additions & 5 deletions xml/System.Security.Cryptography.Pkcs/SignedCms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,8 @@ The following permissions are required to access the signature key:
<Parameter Name="encodedMessage" Type="System.Byte[]" />
</Parameters>
<Docs>
<param name="encodedMessage">Array of byte values that represents the encoded CMS/PKCS #7 message to be decoded.</param>
<summary>The <see cref="M:System.Security.Cryptography.Pkcs.SignedCms.Decode(System.Byte[])" /> method decodes an encoded <see cref="T:System.Security.Cryptography.Pkcs.SignedCms" /> message. Upon successful decoding, the decoded information can be retrieved from the properties of the <see cref="T:System.Security.Cryptography.Pkcs.SignedCms" /> object.</summary>
<param name="encodedMessage">An array of byte values that represents the encoded CMS/PKCS#7 message to be decoded.</param>
<summary>Decodes an encoded <see cref="T:System.Security.Cryptography.Pkcs.SignedCms" /> message.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

Expand All @@ -867,8 +867,8 @@ The following permissions are required to access the signature key:

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">A null reference was passed to a method that does not accept it as a valid argument.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">A cryptographic operation could not be completed.</exception>
<exception cref="T:System.ArgumentNullException"><paramref name="encodedMessage" /> is <see langword="null" />.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException"><paramref name="encodedMessage" /> could not be decoded successfully.</exception>
<altmember cref="M:System.Security.Cryptography.Pkcs.SignedCms.Encode" />
</Docs>
</Member>
Expand All @@ -891,9 +891,12 @@ The following permissions are required to access the signature key:
<Parameter Name="encodedMessage" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="dotnet-plat-ext-5.0;net-5.0" />
</Parameters>
<Docs>
<param name="encodedMessage">To be added.</param>
<summary>To be added.</summary>
<param name="encodedMessage">A read-only span of byte values that represents the encoded CMS/PKCS#7 message to be decoded.</param>
<summary>Decodes an encoded <see cref="T:System.Security.Cryptography.Pkcs.SignedCms" /> message.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException"><paramref name="encodedMessage" /> could not be decoded successfully.</exception>
<altmember cref="M:System.Security.Cryptography.Pkcs.SignedCms.Encode" />
</Docs>
</Member>
<Member MemberName="Detached">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -819,11 +819,28 @@
<Parameter Name="keyStorageFlags" Type="System.Security.Cryptography.X509Certificates.X509KeyStorageFlags" Index="2" FrameworkAlternate="net-5.0" />
</Parameters>
<Docs>
<param name="fileName">To be added.</param>
<param name="password">To be added.</param>
<param name="keyStorageFlags">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<param name="fileName">The name of a certificate file.</param>
<param name="password">The password required to access the X.509 certificate data.</param>
<param name="keyStorageFlags">A bitwise combination of the enumeration values that control where and how to import the certificate.</param>
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> class using a certificate file name, a password, and a key storage flag.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
> [!IMPORTANT]
> Never hard code a password within your source code. Hard-coded passwords can be retrieved from an assembly using the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler), a hex editor, or by simply opening up the assembly in a text editor such as Notepad.exe.

If you create an <xref:System.Security.Cryptography.X509Certificates.X509Certificate2> certificate by specifying a PKCS7 signed file store for `fileName`, the <xref:System.Security.Cryptography.X509Certificates.X509Certificate2> is created for the certificate that signed the store rather than for any of the certificates within the store.

]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">An error with the certificate occurs. For example:

- The certificate file does not exist.

- The certificate is invalid.

- The certificate's password is incorrect.</exception>
</Docs>
</Member>
<Member MemberName=".ctor">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@
<Parameter Name="critical" Type="System.Boolean" Index="1" FrameworkAlternate="net-5.0" />
</Parameters>
<Docs>
<param name="subjectKeyIdentifier">To be added.</param>
<param name="critical">To be added.</param>
<summary>To be added.</summary>
<param name="subjectKeyIdentifier">A read-only span of bytes that represents data to use to create the extension.</param>
<param name="critical">
<see langword="true" /> if the extension is critical; otherwise, <see langword="false" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierExtension" /> class using a read-only span of bytes and a value that identifies whether the extension is critical.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down