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: 3.7.0.0 (3.7.0.0)
Syntax public static byte[] Encode(
this X509ExtensionCollection extensions,
byte enclosingTag = 48
)
<ExtensionAttribute>
Public Shared Function Encode (
extensions As X509ExtensionCollection,
Optional enclosingTag As Byte = 48
) As Byte()
public:
[ExtensionAttribute]
static array<unsigned char>^ Encode(
X509ExtensionCollection^ extensions,
unsigned char enclosingTag = 48
)
[<ExtensionAttribute>]
static member Encode :
extensions : X509ExtensionCollection *
?enclosingTag : byte
(* Defaults:
let _enclosingTag = defaultArg enclosingTag 48
*)
-> byte[]
Parameters
- extensions
- Type: System.Security.Cryptography.X509CertificatesX509ExtensionCollection
Extension collection to encode. - enclosingTag (Optional)
- Type: SystemByte
Outer ASN.1 type. Default is SEQUENCE.
Return Value
Type:
ByteASN.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 Exception | Condition |
---|
ArgumentNullException | extensions parameter is null. |
See Also