Click or drag to resize

X509ExtensionCollectionExtensionsEncode Method

Encodes existing collection of X509Extension objects to ASN.1-encoded byte array.

Namespace:  SysadminsLV.PKI.Utils.CLRExtensions
Assembly:  SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: (
public static byte[] Encode(
	this X509ExtensionCollection extensions,
	byte enclosingTag = 48


Type: System.Security.Cryptography.X509CertificatesX509ExtensionCollection
Extension collection to encode.
enclosingTag (Optional)
Type: SystemByte
Outer ASN.1 type. Default is SEQUENCE.

Return Value

Type: Byte
ASN.1-encoded byte array.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type X509ExtensionCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
ArgumentNullExceptionextensions parameter is null.
See Also