You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Security.Cryptography.Pkcs/Pkcs12SafeBag.xml
+45-20Lines changed: 45 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
</Base>
16
16
<Interfaces />
17
17
<Docs>
18
-
<summary>To be added.</summary>
18
+
<summary>Defines the core behavior of a SafeBag value from the PKCS#12 specification and provides a base for derived classes.</summary>
19
19
<remarks>To be added.</remarks>
20
20
</Docs>
21
21
<Members>
@@ -37,11 +37,24 @@
37
37
<ParameterName="skipCopy"Type="System.Boolean" />
38
38
</Parameters>
39
39
<Docs>
40
-
<paramname="bagIdValue">To be added.</param>
41
-
<paramname="encodedBagValue">To be added.</param>
42
-
<paramname="skipCopy">To be added.</param>
43
-
<summary>To be added.</summary>
44
-
<remarks>To be added.</remarks>
40
+
<paramname="bagIdValue">The Object Identifier (OID), in dotted decimal form, indicating the data type of this SafeBag.</param>
41
+
<paramname="encodedBagValue">The ASN.1 BER encoded value of the SafeBag contents.</param>
42
+
<paramname="skipCopy"><seelangword="true"/> to store <paramrefname="encodedBagValue"/> without making a defensive copy; otherwise, <seelangword="false"/>. The default is <seelangword="false"/>.</param>
43
+
<summary>Called from constructors in derived classes to initialize the <seecref="T:System.Security.Cryptography.Pkcs12.Pkcs12SafeBag"/> class.</summary>
44
+
<remarks>
45
+
<formattype="text/markdown"><![CDATA[
46
+
## Remarks
47
+
The default behavior of this method is to make a defensive copy of `encodedBagValue`.
48
+
When the `skipCopy` parameter is `true`, this defensive copy is skipped.
49
+
If the defensive copy is skipped and the contents of `encodedBagValue` change during the lifetime of the value, or any object produced by its
50
+
methods or properties, then methods and properties on those objects may produce nonsense results or throw exceptions due to the corrupted state.
51
+
Callers are therefore advised to only use a `true` value for the `skipCopy` parameter when they can be reasonably assured that the data will stay intact.
52
+
53
+
If the `bagIdValue` is not a legal dotted decimal format of an OID value an exception will be thrown from <xref:System.Security.Cryptography.Pkcs.Pkcs12SafeBag.Encode> or <xref:System.Security.Cryptography.Pkcs.Pkcs12SafeBag.TryEncode>.
54
+
]]></format>
55
+
</remarks>
56
+
<exceptioncref="T:System.ArgumentNullException">The <paramrefname="bagIdValue"/> parameter is <seelangword="null"/> or the empty string.</exception>
57
+
<exceptioncref="T:System.Security.Cryptography.CryptographicException">The <paramrefname="encodedBagValue"/> parameter does not represent a single ASN.1 BER-encoded value.</exception>
<summary>Gets the ASN.1 BER encoding of the contents of this SafeBag.</summary>
124
+
<value>The ASN.1 BER encoding of the contents of this SafeBag.</value>
125
+
<remarks>
126
+
<formattype="text/markdown"><![CDATA[
127
+
128
+
## Remarks
129
+
130
+
In the encoded structure, the SafeBag.bagValue value is tagged as `[0] EXPLICIT`. The value of this property is only the contents within the explicit tag.
131
+
The explicit tag is automatically applied by <xref:System.Security.Cryptography.Pkcs.Pkcs12SafeBag.Encode> or <xref:System.Security.Cryptography.Pkcs.Pkcs12SafeBag.TryEncode>,
132
+
and is removed during <xref:System.Security.Cryptography.Pkcs12.Pkcs12Info.Decode%2A> and similar methods.
133
+
134
+
]]></format>
135
+
</remarks>
112
136
</Docs>
113
137
</Member>
114
138
<MemberMemberName="GetBagId">
@@ -129,8 +153,8 @@
129
153
</ReturnValue>
130
154
<Parameters />
131
155
<Docs>
132
-
<summary>To be added.</summary>
133
-
<returns>To be added.</returns>
156
+
<summary>Gets the Object Identifier (OID) identifying the content type of this SafeBag.</summary>
157
+
<returns>The Object Identifier (OID) identifying the content type of this SafeBag.</returns>
<paramname="destination">The byte span to receive the encoded SafeBag value.</param>
183
+
<paramname="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramrefname="destination"/>. This parameter is treated as uninitialized.</param>
184
+
<summary>Attempts to encode the SafeBag value into a provided buffer.</summary>
185
+
<returns><seelangword="true"/> if <paramrefname="destination"/> is big enough to receive the output; otherwise, <seelangword="false"/>.</returns>
162
186
<remarks>To be added.</remarks>
187
+
<exceptioncref="T:System.Security.Cryptography.CryptographicException">The object identifier value passed to the constructor was invalid.</exception>
0 commit comments