Decodes the specified extension and returns an object of the specified type that is instantiated with the decoded bytes.
Namespace: LLCryptoLib.Security.CertificatesAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
C# |
---|
protected static Object DecodeExtension( Extension extension, IntPtr oid, Type returnType ) |
Visual Basic |
---|
Protected Shared Function DecodeExtension ( _ extension As Extension, _ oid As IntPtr, _ returnType As Type _ ) As Object |
Visual C++ |
---|
protected: static Object^ DecodeExtension( Extension^ extension, IntPtr oid, Type^ returnType ) |
Parameters
- extension
- Type: LLCryptoLib.Security.Certificates..::..Extension
The certificate extension to decode.
- oid
- Type: System..::..IntPtr
The Object Identifier of the structure.
- returnType
- Type: System..::..Type
A Type instance. See remarks.
Return Value
An object of the type returnType.
Remarks
The specified type should have a public constructor that takes an IntPtr and an int as parameters [in that order]. The IntPtr is a pointer to the decoded buffer and the int contains the number of decoded bytes. The type should not keep the IntPtr reference after construction of an instance, because the memory is freed when the DecodeExtension method returns.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | One of the parameters is a null reference (Nothing in Visual Basic). |
LLCryptoLib.Security.Certificates..::..CertificateException | An error occurs while decoding the certificate extension. |