X509ExtensionExtensionsEncode Method

Encodes current extension 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 X509Extension extension
)

Parameters

extension  X509Extension
Extension to encode.

Return Value

Byte

[Missing <returns> documentation for "M:SysadminsLV.PKI.Cryptography.X509Certificates.X509ExtensionExtensions.Encode(System.Security.Cryptography.X509Certificates.X509Extension)"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type X509Extension. 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

ArgumentNullExceptionextension parameter is null.
ArgumentExceptionExtension object is not properly initialized.

See Also