X509ExtensionCollectionExtensionsEncode Method

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

Definition

Namespace: SysadminsLV.PKI.Cryptography.X509Certificates
Assembly: SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 4.0.1
C#
public static byte[] Encode(
	this X509ExtensionCollection extensions,
	byte enclosingTag = 48
)

Parameters

extensions  X509ExtensionCollection
Extension collection to encode.
enclosingTag  Byte  (Optional)
Outer ASN.1 type. Default is SEQUENCE.

Return Value

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).

Exceptions

ArgumentNullExceptionextensions parameter is null.

See Also