/
Pkcs12Info.xml
254 lines (242 loc) · 17.8 KB
/
Pkcs12Info.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<Type Name="Pkcs12Info" FullName="System.Security.Cryptography.Pkcs.Pkcs12Info">
<TypeSignature Language="C#" Value="public sealed class Pkcs12Info" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit Pkcs12Info extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Security.Cryptography.Pkcs.Pkcs12Info" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class Pkcs12Info" />
<TypeSignature Language="F#" Value="type Pkcs12Info = class" />
<TypeSignature Language="C++ CLI" Value="public ref class Pkcs12Info sealed" />
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Pkcs</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Represents the data from PKCS#12 PFX contents. This class cannot be inherited.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="AuthenticatedSafe">
<MemberSignature Language="C#" Value="public System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Cryptography.Pkcs.Pkcs12SafeContents> AuthenticatedSafe { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.ObjectModel.ReadOnlyCollection`1<class System.Security.Cryptography.Pkcs.Pkcs12SafeContents> AuthenticatedSafe" />
<MemberSignature Language="DocId" Value="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AuthenticatedSafe As ReadOnlyCollection(Of Pkcs12SafeContents)" />
<MemberSignature Language="F#" Value="member this.AuthenticatedSafe : System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Cryptography.Pkcs.Pkcs12SafeContents>" Usage="System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::ObjectModel::ReadOnlyCollection<System::Security::Cryptography::Pkcs::Pkcs12SafeContents ^> ^ AuthenticatedSafe { System::Collections::ObjectModel::ReadOnlyCollection<System::Security::Cryptography::Pkcs::Pkcs12SafeContents ^> ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Pkcs</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="net-8.0;net-9.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[get: System.Runtime.CompilerServices.NullableContext(1)]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.CompilerServices.NullableContext(1)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Cryptography.Pkcs.Pkcs12SafeContents></ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a read-only collection of the SafeContents values present in the PFX AuthenticatedSafe.</summary>
<value>A read-only collection of the SafeContents values present in the PFX AuthenticatedSafe.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Decode">
<MemberSignature Language="C#" Value="public static System.Security.Cryptography.Pkcs.Pkcs12Info Decode (ReadOnlyMemory<byte> encodedBytes, out int bytesConsumed, bool skipCopy = false);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.Cryptography.Pkcs.Pkcs12Info Decode(valuetype System.ReadOnlyMemory`1<unsigned int8> encodedBytes, [out] int32& bytesConsumed, bool skipCopy) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.Pkcs.Pkcs12Info.Decode(System.ReadOnlyMemory{System.Byte},System.Int32@,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Decode (encodedBytes As ReadOnlyMemory(Of Byte), ByRef bytesConsumed As Integer, Optional skipCopy As Boolean = false) As Pkcs12Info" />
<MemberSignature Language="F#" Value="static member Decode : ReadOnlyMemory<byte> * int * bool -> System.Security.Cryptography.Pkcs.Pkcs12Info" Usage="System.Security.Cryptography.Pkcs.Pkcs12Info.Decode (encodedBytes, bytesConsumed, skipCopy)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Pkcs</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.Cryptography.Pkcs.Pkcs12Info</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="encodedBytes" Type="System.ReadOnlyMemory<System.Byte>" />
<Parameter Name="bytesConsumed" Type="System.Int32" RefType="out" />
<Parameter Name="skipCopy" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="encodedBytes">The data to interpret as a PKCS#12 PFX.</param>
<param name="bytesConsumed">When this method returns, contains a value that indicates the number of bytes from <paramref name="encodedBytes" /> which were read by this method. This parameter is treated as uninitialized.</param>
<param name="skipCopy">
<see langword="true" /> to store <paramref name="encodedBytes" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
<summary>Reads the provided data as a PKCS#12 PFX and returns an object view of the contents.</summary>
<returns>An object view of the PKCS#12 PFX decoded from the input.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default behavior of this method is to make a defensive copy of the first `bytesConsumed` bytes from `encodedBytes`.
When the `skipCopy` parameter is `true`, this defensive copy is skipped.
If the defensive copy is skipped and the contents of the first `bytesConsumed` bytes of `encodedBytes` change during the lifetime of the returned value or of any object produced by its
methods or properties, then methods and properties on those objects may produce nonsense results or throw exceptions due to the corrupted state.
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.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The contents of the <paramref name="encodedBytes" /> parameter were not successfully decoded as a PKCS#12 PFX.</exception>
</Docs>
</Member>
<Member MemberName="IntegrityMode">
<MemberSignature Language="C#" Value="public System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode IntegrityMode { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode IntegrityMode" />
<MemberSignature Language="DocId" Value="P:System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IntegrityMode As Pkcs12IntegrityMode" />
<MemberSignature Language="F#" Value="member this.IntegrityMode : System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode" Usage="System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Security::Cryptography::Pkcs::Pkcs12IntegrityMode IntegrityMode { System::Security::Cryptography::Pkcs::Pkcs12IntegrityMode get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Pkcs</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates the type of tamper protection provided for the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents.</summary>
<value>One of the enumeration members that indicates the type of tamper protection provided for the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="VerifyMac">
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Pkcs</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Attempts to verify the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents with a password.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
It's not possible to distinguish the error due to the password being incorrect from the error due to the contents having been altered.
It's usually the case that a password-protected PFX uses the same password for the MAC algorithm providing integrity and the encryption algorithm providing confidentiality,
but the file format doesn't make that a requirement.
Therefore, there is no guarantee that a password which results in a `true` return from this method will succeed on a call to <xref:System.Security.Cryptography.Pkcs.Pkcs12SafeContents.Decrypt%2A>.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="VerifyMac">
<MemberSignature Language="C#" Value="public bool VerifyMac (ReadOnlySpan<char> password);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool VerifyMac(valuetype System.ReadOnlySpan`1<char> password) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.Pkcs.Pkcs12Info.VerifyMac(System.ReadOnlySpan{System.Char})" />
<MemberSignature Language="VB.NET" Value="Public Function VerifyMac (password As ReadOnlySpan(Of Char)) As Boolean" />
<MemberSignature Language="F#" Value="member this.VerifyMac : ReadOnlySpan<char> -> bool" Usage="pkcs12Info.VerifyMac password" />
<MemberSignature Language="C++ CLI" Value="public:
 bool VerifyMac(ReadOnlySpan<char> password);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Pkcs</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="password" Type="System.ReadOnlySpan<System.Char>" />
</Parameters>
<Docs>
<param name="password">The password to use to attempt to verify integrity.</param>
<summary>Attempts to verify the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents with a password represented by a <c>System.ReadOnlySpan{System.Char}</c>.</summary>
<returns>
<see langword="true" /> if the password successfully verifies the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents; <see langword="false" /> if the password is not correct or the contents have been altered.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In the PKCS#12 specification, a distinction is made between a `null` password and an "empty" password, and that difference is reflected in the return value of this method.
`ReadOnlySpan<Char>.Empty` represents the `null` password and `String.Empty.AsSpan()` represents the "empty" password. If one of those two values returns `true`, the other won't.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" /> value is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode.Password" />.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">The hash algorithm option specified by the PKCS#12 PFX contents could not be identified or is not supported by this platform.</exception>
</Docs>
</Member>
<Member MemberName="VerifyMac">
<MemberSignature Language="C#" Value="public bool VerifyMac (string password);" FrameworkAlternate="dotnet-plat-ext-3.0;dotnet-plat-ext-3.1;windowsdesktop-3.0;windowsdesktop-3.1" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool VerifyMac(string password) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.Pkcs.Pkcs12Info.VerifyMac(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function VerifyMac (password As String) As Boolean" />
<MemberSignature Language="F#" Value="member this.VerifyMac : string -> bool" Usage="pkcs12Info.VerifyMac password" />
<MemberSignature Language="C++ CLI" Value="public:
 bool VerifyMac(System::String ^ password);" />
<MemberSignature Language="C#" Value="public bool VerifyMac (string? password);" FrameworkAlternate="dotnet-plat-ext-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netstandard-2.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Pkcs</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="password" Type="System.String" />
</Parameters>
<Docs>
<param name="password">The password to use to attempt to verify integrity.</param>
<summary>Attempts to verify the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents with a password represented by a <see cref="T:System.String" />.</summary>
<returns>
<see langword="true" /> if the password successfully verifies the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents; <see langword="false" /> if the password is not correct or the contents have been altered.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In the PKCS#12 specification, a distinction is made between a `null` password and an "empty" password, and that difference is reflected in the return value of this method.
If the `null` string returns `true`, then <xref:System.String.Empty?displayProperty=nameWithType> returns `false`, and vice versa.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" /> value is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode.Password" />.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">The hash algorithm option specified by the PKCS#12 PFX contents could not be identified or is not supported by this platform.</exception>
</Docs>
</Member>
</Members>
</Type>