50 references to TryEncode
System.Formats.Asn1 (3)
System\Formats\Asn1\AsnWriter.cs (3)
102
/// Gets the number of bytes that would be written by <see cref="
TryEncode
"/>.
105
/// The number of bytes that would be written by <see cref="
TryEncode
"/>.
176
if (!
TryEncode
(destination, out int bytesWritten))
System.Security.Cryptography (41)
src\libraries\Common\src\System\Security\Cryptography\AsymmetricAlgorithmHelpers.Der.cs (1)
26
return writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (3)
1252
return writer.
TryEncode
(destination, out bytesWritten);
1312
return writer.
TryEncode
(destination, out bytesWritten);
1492
return writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaManaged.ECDsa.cs (1)
231
return writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (3)
692
return writer.
TryEncode
(destination, out bytesWritten);
981
return writer.
TryEncode
(destination, out bytesWritten);
1041
return writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (1)
59
bool result = pkcs8Writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (3)
639
return ExportSubjectPublicKeyInfoCore().
TryEncode
(destination, out bytesWritten);
835
return writer.
TryEncode
(destination, out bytesWritten);
936
return writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
59
bool result = pkcs8Writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
414
if (!source.
TryEncode
(sourceRent, out _))
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (1)
182
if (!contentsWriter.
TryEncode
(rentedAuthSafe, out int written))
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (1)
70
return writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (3)
134
return writer.
TryEncode
(destination, out bytesWritten);
152
return writer.
TryEncode
(destination, out bytesWritten);
170
return writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (1)
147
if (!pkcs1PublicKey.
TryEncode
(rented, out int written))
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (4)
538
return ExportSubjectPublicKeyInfoCore().
TryEncode
(destination, out bytesWritten);
681
return writer.
TryEncode
(destination, out bytesWritten);
861
return writer.
TryEncode
(destination, out bytesWritten);
921
return writer.
TryEncode
(destination, out bytesWritten);
System\Security\Cryptography\DSA.cs (4)
941
return writer.
TryEncode
(destination, out bytesWritten);
963
return writer.
TryEncode
(destination, out bytesWritten);
971
return writer.
TryEncode
(destination, out bytesWritten);
979
return writer.
TryEncode
(destination, out bytesWritten);
System\Security\Cryptography\ECAlgorithm.cs (5)
154
return writer.
TryEncode
(destination, out bytesWritten);
226
return writer.
TryEncode
(destination, out bytesWritten);
266
return writer.
TryEncode
(destination, out bytesWritten);
302
return writer.
TryEncode
(destination, out bytesWritten);
660
return writer.
TryEncode
(destination, out bytesWritten);
System\Security\Cryptography\ECDiffieHellmanPublicKey.ExportParameters.cs (1)
54
return writer.
TryEncode
(destination, out bytesWritten);
System\Security\Cryptography\RSA.cs (6)
708
return pkcs1PrivateKey.
TryEncode
(destination, out bytesWritten);
720
return pkcs1PublicKey.
TryEncode
(destination, out bytesWritten);
749
return writer.
TryEncode
(destination, out bytesWritten);
762
return writer.
TryEncode
(destination, out bytesWritten);
821
return writer.
TryEncode
(destination, out bytesWritten);
844
return writer.
TryEncode
(destination, out bytesWritten);
System\Security\Cryptography\X509Certificates\PublicKey.cs (1)
192
EncodeSubjectPublicKeyInfo().
TryEncode
(destination, out bytesWritten);
System.Security.Cryptography.Pkcs (6)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
414
if (!source.
TryEncode
(sourceRent, out _))
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (1)
182
if (!contentsWriter.
TryEncode
(rentedAuthSafe, out int written))
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (1)
70
return writer.
TryEncode
(destination, out bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (3)
134
return writer.
TryEncode
(destination, out bytesWritten);
152
return writer.
TryEncode
(destination, out bytesWritten);
170
return writer.
TryEncode
(destination, out bytesWritten);