32 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"/>. 176if (!TryEncode(destination, out int bytesWritten))
System.Security.Cryptography (23)
src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (1)
279if (!inner.TryEncode(tmp, out int written))
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
414if (!source.TryEncode(sourceRent, out _))
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (1)
193if (!pkcs1PublicKey.TryEncode(rented, out int written))
System\Security\Cryptography\AsymmetricAlgorithmHelpers.Der.cs (1)
30return writer.TryEncode(destination, out bytesWritten);
System\Security\Cryptography\DSA.cs (4)
941return writer.TryEncode(destination, out bytesWritten); 963return writer.TryEncode(destination, out bytesWritten); 971return writer.TryEncode(destination, out bytesWritten); 979return writer.TryEncode(destination, out bytesWritten);
System\Security\Cryptography\ECAlgorithm.cs (5)
154return writer.TryEncode(destination, out bytesWritten); 226return writer.TryEncode(destination, out bytesWritten); 266return writer.TryEncode(destination, out bytesWritten); 302return writer.TryEncode(destination, out bytesWritten); 660return writer.TryEncode(destination, out bytesWritten);
System\Security\Cryptography\ECDiffieHellmanPublicKey.ExportParameters.cs (1)
54return writer.TryEncode(destination, out bytesWritten);
System\Security\Cryptography\RSA.cs (6)
708return pkcs1PrivateKey.TryEncode(destination, out bytesWritten); 720return pkcs1PublicKey.TryEncode(destination, out bytesWritten); 749return writer.TryEncode(destination, out bytesWritten); 762return writer.TryEncode(destination, out bytesWritten); 821return writer.TryEncode(destination, out bytesWritten); 844return writer.TryEncode(destination, out bytesWritten);
System\Security\Cryptography\X509Certificates\PublicKey.cs (1)
119EncodeSubjectPublicKeyInfo().TryEncode(destination, out bytesWritten);
System\Security\Cryptography\X509Certificates\UnixExportProvider.cs (2)
304if (!tmpWriter.TryEncode(keyBuf, out length)) 468if (!tmpWriter.TryEncode(authSafe, out authSafeLength))
System.Security.Cryptography.Pkcs (6)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
414if (!source.TryEncode(sourceRent, out _))
System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (1)
191if (!contentsWriter.TryEncode(rentedAuthSafe, out int written))
System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (1)
64return writer.TryEncode(destination, out bytesWritten);
System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (3)
140return writer.TryEncode(destination, out bytesWritten); 161return writer.TryEncode(destination, out bytesWritten); 182return writer.TryEncode(destination, out bytesWritten);