X509ExtensionExtensionsEncode Method |
Encodes current extension to ASN.1-encoded byte array.
Namespace:
SysadminsLV.PKI.Utils.CLRExtensions
Assembly:
SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.0.0)
Syntax public static byte[] Encode(
this X509Extension extension
)
<ExtensionAttribute>
Public Shared Function Encode (
extension As X509Extension
) As Byte()
public:
[ExtensionAttribute]
static array<unsigned char>^ Encode(
X509Extension^ extension
)
[<ExtensionAttribute>]
static member Encode :
extension : X509Extension -> byte[]
Parameters
- extension
- Type: System.Security.Cryptography.X509CertificatesX509Extension
Extension to encode.
Return Value
Type:
Byte[Missing <returns> documentation for "M:SysadminsLV.PKI.Utils.CLRExtensions.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 Exception | Condition |
---|
ArgumentNullException | extension parameter is null. |
UninitializedObjectException | Extension object is not properly initialized. |
See Also