Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryEncode()

bool System.Formats.Asn1.AsnWriter.TryEncode ( Span< byte > destination,
out int bytesWritten )
inline

Definition at line 173 of file AsnWriter.cs.

174 {
176 if (nestingStack != null && nestingStack.Count != 0)
177 {
179 }
180 if (destination.Length < _offset)
181 {
182 bytesWritten = 0;
183 return false;
184 }
185 if (_offset == 0)
186 {
187 bytesWritten = 0;
188 return true;
189 }
191 _buffer.AsSpan(0, _offset).CopyTo(destination);
192 return true;
193 }
Stack< StackFrame > _nestingStack
Definition AsnWriter.cs:140
static string AsnWriter_EncodeUnbalancedStack
Definition SR.cs:42
Definition SR.cs:7

References System.Formats.Asn1.AsnWriter._buffer, System.Formats.Asn1.AsnWriter._nestingStack, System.Formats.Asn1.AsnWriter._offset, System.SR.AsnWriter_EncodeUnbalancedStack, System.Collections.Generic.Dictionary< TKey, TValue >.Count, and System.destination.

Referenced by System.Formats.Asn1.AsnWriter.Encode(), System.Security.Cryptography.CngPkcs8.ImportPkcs8(), Internal.Cryptography.AsymmetricAlgorithmHelpers.TryConvertIeee1363ToDer(), System.Security.Cryptography.ECDiffieHellman.TryExportECPrivateKey(), System.Security.Cryptography.ECDsa.TryExportECPrivateKey(), System.Security.Cryptography.CngPkcs8.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.CngPkcs8.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.DSA.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.ECDiffieHellman.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.ECDsa.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.RSA.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.DSA.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.ECDiffieHellman.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.ECDsa.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.RSA.TryExportEncryptedPkcs8PrivateKey(), System.Security.Cryptography.DSA.TryExportPkcs8PrivateKey(), System.Security.Cryptography.ECDiffieHellman.TryExportPkcs8PrivateKey(), System.Security.Cryptography.ECDsa.TryExportPkcs8PrivateKey(), System.Security.Cryptography.RSA.TryExportPkcs8PrivateKey(), System.Security.Cryptography.RSA.TryExportRSAPrivateKey(), System.Security.Cryptography.RSA.TryExportRSAPublicKey(), System.Security.Cryptography.DSA.TryExportSubjectPublicKeyInfo(), System.Security.Cryptography.ECDiffieHellmanPublicKey.TryExportSubjectPublicKeyInfo(), System.Security.Cryptography.RSA.TryExportSubjectPublicKeyInfo(), System.Security.Cryptography.X509Certificates.PublicKey.TryExportSubjectPublicKeyInfo(), and System.Security.Cryptography.DSAKeyFormatHelper.WriteKeyComponent().