-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathECAlgorithm.xml
985 lines (907 loc) · 64.4 KB
/
ECAlgorithm.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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
<Type Name="ECAlgorithm" FullName="System.Security.Cryptography.ECAlgorithm">
<TypeSignature Language="C#" Value="public abstract class ECAlgorithm : System.Security.Cryptography.AsymmetricAlgorithm" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit ECAlgorithm extends System.Security.Cryptography.AsymmetricAlgorithm" />
<TypeSignature Language="DocId" Value="T:System.Security.Cryptography.ECAlgorithm" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class ECAlgorithm
Inherits AsymmetricAlgorithm" />
<TypeSignature Language="F#" Value="type ECAlgorithm = class
 inherit AsymmetricAlgorithm" />
<TypeSignature Language="C++ CLI" Value="public ref class ECAlgorithm abstract : System::Security::Cryptography::AsymmetricAlgorithm" />
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Security.Cryptography.AsymmetricAlgorithm</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Represents the abstract class from which elliptic-curve asymmetric algorithms can inherit.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected ECAlgorithm ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:
 ECAlgorithm();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.ECAlgorithm" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ExportECPrivateKey">
<MemberSignature Language="C#" Value="public virtual byte[] ExportECPrivateKey ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance unsigned int8[] ExportECPrivateKey() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ExportECPrivateKey" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function ExportECPrivateKey () As Byte()" />
<MemberSignature Language="F#" Value="abstract member ExportECPrivateKey : unit -> byte[]
override this.ExportECPrivateKey : unit -> byte[]" Usage="eCAlgorithm.ExportECPrivateKey " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual cli::array <System::Byte> ^ ExportECPrivateKey();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Exports the current key in the ECPrivateKey format.</summary>
<returns>A byte array containing the ECPrivateKey representation of this key.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
</Docs>
</Member>
<Member MemberName="ExportECPrivateKeyPem">
<MemberSignature Language="C#" Value="public string ExportECPrivateKeyPem ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string ExportECPrivateKeyPem() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ExportECPrivateKeyPem" />
<MemberSignature Language="VB.NET" Value="Public Function ExportECPrivateKeyPem () As String" />
<MemberSignature Language="F#" Value="member this.ExportECPrivateKeyPem : unit -> string" Usage="eCAlgorithm.ExportECPrivateKeyPem " />
<MemberSignature Language="C++ CLI" Value="public:
 System::String ^ ExportECPrivateKeyPem();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Exports the current key in the ECPrivateKey format, PEM encoded.</summary>
<returns>A string containing the PEM-encoded ECPrivateKey.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A PEM-encoded ECPrivateKey will begin with `-----BEGIN EC PRIVATE KEY-----`
and end with `-----END EC 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.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
</Docs>
</Member>
<Member MemberName="ExportExplicitParameters">
<MemberSignature Language="C#" Value="public virtual System.Security.Cryptography.ECParameters ExportExplicitParameters (bool includePrivateParameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype System.Security.Cryptography.ECParameters ExportExplicitParameters(bool includePrivateParameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ExportExplicitParameters(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function ExportExplicitParameters (includePrivateParameters As Boolean) As ECParameters" />
<MemberSignature Language="F#" Value="abstract member ExportExplicitParameters : bool -> System.Security.Cryptography.ECParameters
override this.ExportExplicitParameters : bool -> System.Security.Cryptography.ECParameters" Usage="eCAlgorithm.ExportExplicitParameters includePrivateParameters" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual System::Security::Cryptography::ECParameters ExportExplicitParameters(bool includePrivateParameters);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.Cryptography.ECParameters</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="includePrivateParameters" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="includePrivateParameters">
<see langword="true" /> to include private parameters, otherwise, <see langword="false" />.</param>
<summary>When overridden in a derived class, exports the explicit <see cref="T:System.Security.Cryptography.ECParameters" /> for an ECCurve.</summary>
<returns>The exported explicit parameters.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation.</exception>
</Docs>
</Member>
<Member MemberName="ExportParameters">
<MemberSignature Language="C#" Value="public virtual System.Security.Cryptography.ECParameters ExportParameters (bool includePrivateParameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype System.Security.Cryptography.ECParameters ExportParameters(bool includePrivateParameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ExportParameters(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function ExportParameters (includePrivateParameters As Boolean) As ECParameters" />
<MemberSignature Language="F#" Value="abstract member ExportParameters : bool -> System.Security.Cryptography.ECParameters
override this.ExportParameters : bool -> System.Security.Cryptography.ECParameters" Usage="eCAlgorithm.ExportParameters includePrivateParameters" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual System::Security::Cryptography::ECParameters ExportParameters(bool includePrivateParameters);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.Cryptography.ECParameters</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="includePrivateParameters" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="includePrivateParameters">
<see langword="true" /> to include private parameters, otherwise, <see langword="false" />.</param>
<summary>When overridden in a derived class, exports the named or explicit <see cref="T:System.Security.Cryptography.ECParameters" /> for an ECCurve.
If the curve has a name, the Curve property will contain named curve parameters otherwise it will contain explicit parameters.</summary>
<returns>The exported parameters.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation.</exception>
</Docs>
</Member>
<Member MemberName="GenerateKey">
<MemberSignature Language="C#" Value="public virtual void GenerateKey (System.Security.Cryptography.ECCurve curve);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void GenerateKey(valuetype System.Security.Cryptography.ECCurve curve) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.GenerateKey(System.Security.Cryptography.ECCurve)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub GenerateKey (curve As ECCurve)" />
<MemberSignature Language="F#" Value="abstract member GenerateKey : System.Security.Cryptography.ECCurve -> unit
override this.GenerateKey : System.Security.Cryptography.ECCurve -> unit" Usage="eCAlgorithm.GenerateKey curve" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void GenerateKey(System::Security::Cryptography::ECCurve curve);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="curve" Type="System.Security.Cryptography.ECCurve" />
</Parameters>
<Docs>
<param name="curve">The curve to use.</param>
<summary>When overridden in a derived class, generates a new public/private keypair for the specified curve.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation.</exception>
</Docs>
</Member>
<Member MemberName="ImportECPrivateKey">
<MemberSignature Language="C#" Value="public virtual void ImportECPrivateKey (ReadOnlySpan<byte> source, out int bytesRead);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ImportECPrivateKey(valuetype System.ReadOnlySpan`1<unsigned int8> source, [out] int32& bytesRead) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ImportECPrivateKey(System.ReadOnlySpan{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ImportECPrivateKey (source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)" />
<MemberSignature Language="F#" Value="abstract member ImportECPrivateKey : ReadOnlySpan<byte> * int -> unit
override this.ImportECPrivateKey : ReadOnlySpan<byte> * int -> unit" Usage="eCAlgorithm.ImportECPrivateKey (source, bytesRead)" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void ImportECPrivateKey(ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] int % bytesRead);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.ReadOnlySpan<System.Byte>" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="source">The bytes of an ECPrivateKey structure in the ASN.1-BER encoding.</param>
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
<summary>Imports the public/private keypair from an ECPrivateKey structure, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method only supports the binary (BER/CER/DER) encoding of ECPrivateKey.
If the value is Base64-encoded, the caller must Base64-decode the contents before calling this method.
If the value is PEM-encoded, <xref:System.Security.Cryptography.ECAlgorithm.ImportFromPem(System.ReadOnlySpan{System.Char})> should be used.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ImportParameters(System.Security.Cryptography.ECParameters)" />.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">
<p>
The contents of <paramref name="source" /> do not represent an
ASN.1-BER-encoded PKCS#8 ECPrivateKey structure.
</p>
<p>-or-</p>
<p>The key import failed.</p>
</exception>
</Docs>
</Member>
<Member MemberName="ImportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public override void ImportEncryptedPkcs8PrivateKey (ReadOnlySpan<byte> passwordBytes, ReadOnlySpan<byte> source, out int bytesRead);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void ImportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1<unsigned int8> passwordBytes, valuetype System.ReadOnlySpan`1<unsigned int8> source, [out] int32& bytesRead) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub ImportEncryptedPkcs8PrivateKey (passwordBytes As ReadOnlySpan(Of Byte), source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)" />
<MemberSignature Language="F#" Value="override this.ImportEncryptedPkcs8PrivateKey : ReadOnlySpan<byte> * ReadOnlySpan<byte> * int -> unit" Usage="eCAlgorithm.ImportEncryptedPkcs8PrivateKey (passwordBytes, source, bytesRead)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<System::Byte> passwordBytes, ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] int % bytesRead);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="passwordBytes" Type="System.ReadOnlySpan<System.Byte>" />
<Parameter Name="source" Type="System.ReadOnlySpan<System.Byte>" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="passwordBytes">The bytes to use as a password when decrypting the key material.</param>
<param name="source">The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding.</param>
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
<summary>Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The password bytes are passed directly into the Key Derivation Function (KDF)
used by the algorithm indicated by the EncryptedPrivateKeyInfo contents.
This enables compatibility with other systems which use a text encoding
other than UTF-8 when processing passwords with PBKDF2 (Password-Based Key Derivation Function 2).
This method only supports the binary (BER/CER/DER) encoding of EncryptedPrivateKeyInfo.
If the value is Base64-encoded, the caller must Base64-decode the contents before calling this method.
If the contents are PEM-encoded, <xref:System.Security.Cryptography.ECAlgorithm.ImportFromEncryptedPem(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Byte})>
should be used.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">
<p>The password is incorrect.</p>
<p>-or-</p>
<p>
The contents of <paramref name="source" /> indicate the Key Derivation Function (KDF)
to apply is the legacy PKCS#12 KDF, which requires <see langword="char" />-based passwords.
</p>
<p>-or-</p>
<p>
The contents of <paramref name="source" /> do not represent an
ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure.
</p>
<p>-or-</p>
<p>
The contents of <paramref name="source" /> indicate the key is for
an algorithm other than the algorithm represented by this instance.
</p>
<p>-or-</p>
<p>
The contents of <paramref name="source" /> represent the key in a format
that is not supported.
</p>
<p>-or-</p>
<p>The algorithm-specific key import failed.</p>
</exception>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ImportParameters(System.Security.Cryptography.ECParameters)" />.</exception>
</Docs>
</Member>
<Member MemberName="ImportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public override void ImportEncryptedPkcs8PrivateKey (ReadOnlySpan<char> password, ReadOnlySpan<byte> source, out int bytesRead);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void ImportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1<char> password, valuetype System.ReadOnlySpan`1<unsigned int8> source, [out] int32& bytesRead) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub ImportEncryptedPkcs8PrivateKey (password As ReadOnlySpan(Of Char), source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)" />
<MemberSignature Language="F#" Value="override this.ImportEncryptedPkcs8PrivateKey : ReadOnlySpan<char> * ReadOnlySpan<byte> * int -> unit" Usage="eCAlgorithm.ImportEncryptedPkcs8PrivateKey (password, source, bytesRead)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] int % bytesRead);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="password" Type="System.ReadOnlySpan<System.Char>" />
<Parameter Name="source" Type="System.ReadOnlySpan<System.Byte>" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="password">The password to use when decrypting the key material.</param>
<param name="source">The bytes of a PKCS#8 EncryptedPrivateKeyInfo structure in the ASN.1-BER encoding.</param>
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
<summary>Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the contents of `source` indicate an algorithm that uses PBKDF1
(Password-Based Key Derivation Function 1) or PBKDF2 (Password-Based Key Derivation Function 2),
the password is converted to bytes via the UTF-8 encoding.
This method only supports the binary (BER/CER/DER) encoding of EncryptedPrivateKeyInfo.
If the value is Base64-encoded, the caller must Base64-decode the contents before calling this method.
If the contents are PEM-encoded, <xref:System.Security.Cryptography.ECAlgorithm.ImportFromEncryptedPem(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Char})>
should be used.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">
<p>
The contents of <paramref name="source" /> do not represent an
ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure.
</p>
<p>-or-</p>
<p>
The contents of <paramref name="source" /> indicate the key is for
an algorithm other than the algorithm represented by this instance.
</p>
<p>-or-</p>
<p>
The contents of <paramref name="source" /> represent the key in a format
that is not supported.
</p>
<p>-or-</p>
<p>The algorithm-specific key import failed.</p>
</exception>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ImportParameters(System.Security.Cryptography.ECParameters)" />.</exception>
</Docs>
</Member>
<Member MemberName="ImportFromEncryptedPem">
<MemberSignature Language="C#" Value="public override void ImportFromEncryptedPem (ReadOnlySpan<char> input, ReadOnlySpan<byte> passwordBytes);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void ImportFromEncryptedPem(valuetype System.ReadOnlySpan`1<char> input, valuetype System.ReadOnlySpan`1<unsigned int8> passwordBytes) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ImportFromEncryptedPem(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Byte})" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub ImportFromEncryptedPem (input As ReadOnlySpan(Of Char), passwordBytes As ReadOnlySpan(Of Byte))" />
<MemberSignature Language="F#" Value="override this.ImportFromEncryptedPem : ReadOnlySpan<char> * ReadOnlySpan<byte> -> unit" Usage="eCAlgorithm.ImportFromEncryptedPem (input, passwordBytes)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void ImportFromEncryptedPem(ReadOnlySpan<char> input, ReadOnlySpan<System::Byte> passwordBytes);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="input" Type="System.ReadOnlySpan<System.Char>" />
<Parameter Name="passwordBytes" Type="System.ReadOnlySpan<System.Byte>" />
</Parameters>
<Docs>
<param name="input">The PEM text of the encrypted key to import.</param>
<param name="passwordBytes">The bytes to use as a password when decrypting the key material.</param>
<summary>Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The password bytes are passed directly into the Key Derivation Function (KDF)
used by the algorithm indicated by `pbeParameters`. This enables compatibility
with other systems which use a text encoding other than UTF-8 when processing
passwords with PBKDF2 (Password-Based Key Derivation Function 2).
Unsupported or malformed PEM-encoded objects are ignored. If multiple supported PEM labels
are found, an exception is thrown to prevent importing a key when
the key is ambiguous.
This method supports the `ENCRYPTED PRIVATE KEY` PEM label.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="input" /> does not contain a PEM-encoded key with a recognized label.
-or-
<paramref name="input" /> contains multiple PEM-encoded keys with a recognized label.
</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">
The password is incorrect.
-or-
The base-64 decoded contents of the PEM text from <paramref name="input" />
do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure.
-or-
The base-64 decoded contents of the PEM text from <paramref name="input" />
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 <paramref name="input" />
represent the key in a format that is not supported.
-or-
The algorithm-specific key import failed.
</exception>
</Docs>
</Member>
<Member MemberName="ImportFromEncryptedPem">
<MemberSignature Language="C#" Value="public override void ImportFromEncryptedPem (ReadOnlySpan<char> input, ReadOnlySpan<char> password);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void ImportFromEncryptedPem(valuetype System.ReadOnlySpan`1<char> input, valuetype System.ReadOnlySpan`1<char> password) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ImportFromEncryptedPem(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Char})" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub ImportFromEncryptedPem (input As ReadOnlySpan(Of Char), password As ReadOnlySpan(Of Char))" />
<MemberSignature Language="F#" Value="override this.ImportFromEncryptedPem : ReadOnlySpan<char> * ReadOnlySpan<char> -> unit" Usage="eCAlgorithm.ImportFromEncryptedPem (input, password)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void ImportFromEncryptedPem(ReadOnlySpan<char> input, ReadOnlySpan<char> password);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="input" Type="System.ReadOnlySpan<System.Char>" />
<Parameter Name="password" Type="System.ReadOnlySpan<System.Char>" />
</Parameters>
<Docs>
<param name="input">The PEM text of the encrypted key to import.</param>
<param name="password">The password to use for decrypting the key material.</param>
<summary>Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the base-64 decoded contents of `input` indicate an algorithm that uses PBKDF1
(Password-Based Key Derivation Function 1) or PBKDF2 (Password-Based Key Derivation Function 2),
the password is converted to bytes via the UTF-8 encoding.
Unsupported or malformed PEM-encoded objects will be ignored. If multiple supported PEM labels
are found, an exception is thrown to prevent importing a key when
the key is ambiguous.
This method supports the `ENCRYPTED PRIVATE KEY` PEM label.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="input" /> does not contain a PEM-encoded key with a recognized label.
-or-
<paramref name="input" /> contains multiple PEM-encoded keys with a recognized label.
</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">
The password is incorrect.
-or-
The base-64 decoded contents of the PEM text from <paramref name="input" />
do not represent an ASN.1-BER-encoded PKCS#8 EncryptedPrivateKeyInfo structure.
-or-
The base-64 decoded contents of the PEM text from <paramref name="input" />
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 <paramref name="input" />
represent the key in a format that is not supported.
-or-
The algorithm-specific key import failed.
</exception>
</Docs>
</Member>
<Member MemberName="ImportFromPem">
<MemberSignature Language="C#" Value="public override void ImportFromPem (ReadOnlySpan<char> input);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void ImportFromPem(valuetype System.ReadOnlySpan`1<char> input) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ImportFromPem(System.ReadOnlySpan{System.Char})" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub ImportFromPem (input As ReadOnlySpan(Of Char))" />
<MemberSignature Language="F#" Value="override this.ImportFromPem : ReadOnlySpan<char> -> unit" Usage="eCAlgorithm.ImportFromPem input" />
<MemberSignature Language="C++ CLI" Value="public:
 override void ImportFromPem(ReadOnlySpan<char> input);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="input" Type="System.ReadOnlySpan<System.Char>" />
</Parameters>
<Docs>
<param name="input">The PEM text of the key to import.</param>
<summary>Imports an RFC 7468 PEM-encoded key, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Unsupported or malformed PEM-encoded objects will be ignored. If multiple supported PEM labels are found, an exception is raised to prevent importing a key when the key is ambiguous.
This method supports the following PEM labels:
- `PUBLIC KEY`
- `PRIVATE KEY`
- `EC PRIVATE KEY`
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="input" /> does not contain a PEM-encoded key with a recognized label.
-or-
<paramref name="input" /> contains multiple PEM-encoded keys with a recognized label.
-or-
<paramref name="input" /> contains an encrypted PEM-encoded key.
</exception>
</Docs>
</Member>
<Member MemberName="ImportParameters">
<MemberSignature Language="C#" Value="public virtual void ImportParameters (System.Security.Cryptography.ECParameters parameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ImportParameters(valuetype System.Security.Cryptography.ECParameters parameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ImportParameters(System.Security.Cryptography.ECParameters)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ImportParameters (parameters As ECParameters)" />
<MemberSignature Language="F#" Value="abstract member ImportParameters : System.Security.Cryptography.ECParameters -> unit
override this.ImportParameters : System.Security.Cryptography.ECParameters -> unit" Usage="eCAlgorithm.ImportParameters parameters" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void ImportParameters(System::Security::Cryptography::ECParameters parameters);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="parameters" Type="System.Security.Cryptography.ECParameters" />
</Parameters>
<Docs>
<param name="parameters">The curve parameters.</param>
<summary>When overridden in a derived class, imports the specified <see cref="T:System.Security.Cryptography.ECParameters" />.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation.</exception>
</Docs>
</Member>
<Member MemberName="ImportPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public override void ImportPkcs8PrivateKey (ReadOnlySpan<byte> source, out int bytesRead);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void ImportPkcs8PrivateKey(valuetype System.ReadOnlySpan`1<unsigned int8> source, [out] int32& bytesRead) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ImportPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub ImportPkcs8PrivateKey (source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)" />
<MemberSignature Language="F#" Value="override this.ImportPkcs8PrivateKey : ReadOnlySpan<byte> * int -> unit" Usage="eCAlgorithm.ImportPkcs8PrivateKey (source, bytesRead)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void ImportPkcs8PrivateKey(ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] int % bytesRead);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.ReadOnlySpan<System.Byte>" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="source">The bytes of a PKCS#8 PrivateKeyInfo structure in the ASN.1-BER encoding.</param>
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
<summary>Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method only supports the binary (BER/CER/DER) encoding of PrivateKeyInfo.
If the value is Base64-encoded, the caller must Base64-decode the contents before calling this method.
If the value is PEM-encoded, <xref:System.Security.Cryptography.ECAlgorithm.ImportFromPem(System.ReadOnlySpan{System.Char})> should be used.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ImportParameters(System.Security.Cryptography.ECParameters)" />.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">
<p>
The contents of <paramref name="source" /> do not represent an ASN.1-BER-encoded
PKCS#8 PrivateKeyInfo structure.
</p>
<p>-or-</p>
<p>
The contents of <paramref name="source" /> indicate the key is for an algorithm
other than the algorithm represented by this instance.
</p>
<p>-or-</p>
<p>The contents of <paramref name="source" /> represent the key in a format that is not supported.</p>
<p>-or-</p>
<p>
The algorithm-specific key import failed.
</p>
</exception>
</Docs>
</Member>
<Member MemberName="ImportSubjectPublicKeyInfo">
<MemberSignature Language="C#" Value="public override void ImportSubjectPublicKeyInfo (ReadOnlySpan<byte> source, out int bytesRead);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void ImportSubjectPublicKeyInfo(valuetype System.ReadOnlySpan`1<unsigned int8> source, [out] int32& bytesRead) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.ImportSubjectPublicKeyInfo(System.ReadOnlySpan{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub ImportSubjectPublicKeyInfo (source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)" />
<MemberSignature Language="F#" Value="override this.ImportSubjectPublicKeyInfo : ReadOnlySpan<byte> * int -> unit" Usage="eCAlgorithm.ImportSubjectPublicKeyInfo (source, bytesRead)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void ImportSubjectPublicKeyInfo(ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] int % bytesRead);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.ReadOnlySpan<System.Byte>" />
<Parameter Name="bytesRead" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="source">The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.</param>
<param name="bytesRead">When this method returns, contains a value that indicates the number of bytes read from <paramref name="source" />. This parameter is treated as uninitialized.</param>
<summary>Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method only supports the binary (DER) encoding of SubjectPublicKeyInfo.
If the value is Base64-encoded, the caller must Base64-decode the contents before calling this method.
If this value is PEM-encoded, <xref:System.Security.Cryptography.ECAlgorithm.ImportFromPem(System.ReadOnlySpan{System.Char})> should be used.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ImportParameters(System.Security.Cryptography.ECParameters)" />.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">
<p>
The contents of <paramref name="source" /> do not represent an
ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure.
</p>
<p>-or-</p>
<p>
The contents of <paramref name="source" /> indicate the key is for an algorithm
other than the algorithm represented by this instance.
</p>
<p>-or-</p>
<p>
The contents of <paramref name="source" /> represent the key in a format that is not supported.
</p>
<p>-or-</p>
<p>The algorithm-specific key import failed.</p>
</exception>
</Docs>
</Member>
<Member MemberName="TryExportECPrivateKey">
<MemberSignature Language="C#" Value="public virtual bool TryExportECPrivateKey (Span<byte> destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool TryExportECPrivateKey(valuetype System.Span`1<unsigned int8> destination, [out] int32& bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.TryExportECPrivateKey(System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function TryExportECPrivateKey (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="F#" Value="abstract member TryExportECPrivateKey : Span<byte> * int -> bool
override this.TryExportECPrivateKey : Span<byte> * int -> bool" Usage="eCAlgorithm.TryExportECPrivateKey (destination, bytesWritten)" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual bool TryExportECPrivateKey(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<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="destination" Type="System.Span<System.Byte>" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="destination">The byte span to receive the ECPrivateKey data.</param>
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />.
This parameter is treated as uninitialized.</param>
<summary>Attempts to export the current key in the ECPrivateKey format into a provided buffer.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ExportParameters(System.Boolean)" />.</exception>
</Docs>
</Member>
<Member MemberName="TryExportECPrivateKeyPem">
<MemberSignature Language="C#" Value="public bool TryExportECPrivateKeyPem (Span<char> destination, out int charsWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool TryExportECPrivateKeyPem(valuetype System.Span`1<char> destination, [out] int32& charsWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.TryExportECPrivateKeyPem(System.Span{System.Char},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Function TryExportECPrivateKeyPem (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean" />
<MemberSignature Language="F#" Value="member this.TryExportECPrivateKeyPem : Span<char> * int -> bool" Usage="eCAlgorithm.TryExportECPrivateKeyPem (destination, charsWritten)" />
<MemberSignature Language="C++ CLI" Value="public:
 bool TryExportECPrivateKeyPem(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<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="destination" Type="System.Span<System.Char>" />
<Parameter Name="charsWritten" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="destination">The character span to receive the PEM-encoded ECPrivateKey data.</param>
<param name="charsWritten">When this method returns, contains a value that indicates the number of characters written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
<summary>Attempts to export the current key in the PEM-encoded ECPrivateKey format into a provided buffer.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A PEM-encoded ECPrivateKey will begin with
`-----BEGIN EC PRIVATE KEY-----` and end with
`-----END EC 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.
]]></format>
</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
</Docs>
</Member>
<Member MemberName="TryExportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public override bool TryExportEncryptedPkcs8PrivateKey (ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool TryExportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1<unsigned int8> passwordBytes, class System.Security.Cryptography.PbeParameters pbeParameters, valuetype System.Span`1<unsigned int8> destination, [out] int32& bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function TryExportEncryptedPkcs8PrivateKey (passwordBytes As ReadOnlySpan(Of Byte), pbeParameters As PbeParameters, destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="F#" Value="override this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan<byte> * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool" Usage="eCAlgorithm.TryExportEncryptedPkcs8PrivateKey (passwordBytes, pbeParameters, destination, bytesWritten)" />
<MemberSignature Language="C++ CLI" Value="public:
 override bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<System::Byte> passwordBytes, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<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="passwordBytes" Type="System.ReadOnlySpan<System.Byte>" />
<Parameter Name="pbeParameters" Type="System.Security.Cryptography.PbeParameters">
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="destination" Type="System.Span<System.Byte>" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="passwordBytes">The bytes to use as a password when encrypting the key material.</param>
<param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
<param name="destination">The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data.</param>
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
<summary>Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The password bytes are passed directly into the Key Derivation Function (KDF)
used by the algorithm indicated by `pbeParameters`. This
enables compatibility with other systems which use a text encoding other than
UTF-8 when processing passwords with PBKDF2 (Password-Based Key Derivation Function 2).
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="pbeParameters" /> is <see langword="null" />.</exception>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ExportParameters(System.Boolean)" />.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">
<p>
The key could not be exported.
</p>
<p>-or-</p>
<p>
<paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" />
should be used, which requires <see langword="char" />-based passwords.
</p>
</exception>
</Docs>
</Member>
<Member MemberName="TryExportEncryptedPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public override bool TryExportEncryptedPkcs8PrivateKey (ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool TryExportEncryptedPkcs8PrivateKey(valuetype System.ReadOnlySpan`1<char> password, class System.Security.Cryptography.PbeParameters pbeParameters, valuetype System.Span`1<unsigned int8> destination, [out] int32& bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function TryExportEncryptedPkcs8PrivateKey (password As ReadOnlySpan(Of Char), pbeParameters As PbeParameters, destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="F#" Value="override this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan<char> * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool" Usage="eCAlgorithm.TryExportEncryptedPkcs8PrivateKey (password, pbeParameters, destination, bytesWritten)" />
<MemberSignature Language="C++ CLI" Value="public:
 override bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<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>" />
<Parameter Name="pbeParameters" Type="System.Security.Cryptography.PbeParameters">
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="destination" Type="System.Span<System.Byte>" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="password">The password to use when encrypting the key material.</param>
<param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
<param name="destination">The byte span to receive the PKCS#8 EncryptedPrivateKeyInfo data.</param>
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
<summary>Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When `pbeParameters` indicates an algorithm that uses PBKDF2
(Password-Based Key Derivation Function 2), the password is converted
to bytes via the UTF-8 encoding.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="pbeParameters" /> is <see langword="null" />.</exception>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ExportParameters(System.Boolean)" />.</exception>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
</Docs>
</Member>
<Member MemberName="TryExportPkcs8PrivateKey">
<MemberSignature Language="C#" Value="public override bool TryExportPkcs8PrivateKey (Span<byte> destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool TryExportPkcs8PrivateKey(valuetype System.Span`1<unsigned int8> destination, [out] int32& bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.TryExportPkcs8PrivateKey(System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function TryExportPkcs8PrivateKey (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="F#" Value="override this.TryExportPkcs8PrivateKey : Span<byte> * int -> bool" Usage="eCAlgorithm.TryExportPkcs8PrivateKey (destination, bytesWritten)" />
<MemberSignature Language="C++ CLI" Value="public:
 override bool TryExportPkcs8PrivateKey(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<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="destination" Type="System.Span<System.Byte>" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="destination">The byte span to receive the PKCS#8 PrivateKeyInfo data.</param>
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
<summary>Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ExportParameters(System.Boolean)" />.</exception>
</Docs>
</Member>
<Member MemberName="TryExportSubjectPublicKeyInfo">
<MemberSignature Language="C#" Value="public override bool TryExportSubjectPublicKeyInfo (Span<byte> destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool TryExportSubjectPublicKeyInfo(valuetype System.Span`1<unsigned int8> destination, [out] int32& bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.ECAlgorithm.TryExportSubjectPublicKeyInfo(System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function TryExportSubjectPublicKeyInfo (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="F#" Value="override this.TryExportSubjectPublicKeyInfo : Span<byte> * int -> bool" Usage="eCAlgorithm.TryExportSubjectPublicKeyInfo (destination, bytesWritten)" />
<MemberSignature Language="C++ CLI" Value="public:
 override bool TryExportSubjectPublicKeyInfo(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography</AssemblyName>
<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="destination" Type="System.Span<System.Byte>" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" />
</Parameters>
<Docs>
<param name="destination">The byte span to receive the X.509 SubjectPublicKeyInfo data.</param>
<param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />.
This parameter is treated as uninitialized.</param>
<summary>Attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.Security.Cryptography.CryptographicException">The key could not be exported.</exception>
<exception cref="T:System.NotSupportedException">A derived class has not provided an implementation for <see cref="M:System.Security.Cryptography.ECAlgorithm.ExportParameters(System.Boolean)" />.</exception>
</Docs>
</Member>
</Members>
</Type>