C# Class Net.Pkcs11Interop.LowLevelAPI81.CkaUtils

Utility class that helps to manage CK_ATTRIBUTE structure
Afficher le fichier Open project: Pkcs11Interop/Pkcs11Interop Class Usage Examples

Méthodes publiques

Méthode Description
ConvertValue ( CK_ATTRIBUTE &attribute, CKM &value ) : void

Reads value of attribute and returns it as mechanism array

ConvertValue ( CK_ATTRIBUTE &attribute, CK_ATTRIBUTE &value ) : void

Reads value of attribute and returns it as attribute array

ConvertValue ( CK_ATTRIBUTE &attribute, System.DateTime &value ) : void

Reads value of attribute and returns it as DateTime (CK_DATE)

ConvertValue ( CK_ATTRIBUTE &attribute, bool &value ) : void

Reads value of attribute and returns it as bool

ConvertValue ( CK_ATTRIBUTE &attribute, byte &value ) : void

Reads value of attribute and returns it as byte array

ConvertValue ( CK_ATTRIBUTE &attribute, string &value ) : void

Reads value of attribute and returns it as string

ConvertValue ( CK_ATTRIBUTE &attribute, ulong &value ) : void

Reads value of attribute and returns it as ulong

CreateAttribute ( CKA type ) : CK_ATTRIBUTE

Creates attribute of given type with no value

CreateAttribute ( CKA type, CKC value ) : CK_ATTRIBUTE

Creates attribute of given type with CKC value

CreateAttribute ( CKA type, CKK value ) : CK_ATTRIBUTE

Creates attribute of given type with CKK value

CreateAttribute ( CKA type, CKM value ) : CK_ATTRIBUTE

Creates attribute of given type with mechanism array value

CreateAttribute ( CKA type, CKO value ) : CK_ATTRIBUTE

Creates attribute of given type with CKO value

CreateAttribute ( CKA type, CK_ATTRIBUTE value ) : CK_ATTRIBUTE

Creates attribute of given type with attribute array value

CreateAttribute ( CKA type, System.DateTime value ) : CK_ATTRIBUTE

Creates attribute of given type with DateTime (CK_DATE) value

CreateAttribute ( CKA type, bool value ) : CK_ATTRIBUTE

Creates attribute of given type with bool value

CreateAttribute ( CKA type, byte value ) : CK_ATTRIBUTE

Creates attribute of given type with byte array value

CreateAttribute ( CKA type, string value ) : CK_ATTRIBUTE

Creates attribute of given type with string value

CreateAttribute ( CKA type, ulong value ) : CK_ATTRIBUTE

Creates attribute of given type with ulong value

CreateAttribute ( ulong type ) : CK_ATTRIBUTE

Creates attribute of given type with no value

CreateAttribute ( ulong type, CKM value ) : CK_ATTRIBUTE

Creates attribute of given type with mechanism array value

CreateAttribute ( ulong type, CK_ATTRIBUTE value ) : CK_ATTRIBUTE

Creates attribute of given type with attribute array value

CreateAttribute ( ulong type, System.DateTime value ) : CK_ATTRIBUTE

Creates attribute of given type with DateTime (CK_DATE) value

CreateAttribute ( ulong type, bool value ) : CK_ATTRIBUTE

Creates attribute of given type with bool value

CreateAttribute ( ulong type, byte value ) : CK_ATTRIBUTE

Creates attribute of given type with byte array value

CreateAttribute ( ulong type, string value ) : CK_ATTRIBUTE

Creates attribute of given type with string value

CreateAttribute ( ulong type, ulong value ) : CK_ATTRIBUTE

Creates attribute of given type with ulong value

Private Methods

Méthode Description
ConvertValue ( CK_ATTRIBUTE &attribute ) : byte[]

Copies attribute value from unmanaged memory to managed byte array

_CreateAttribute ( ulong type, byte value ) : CK_ATTRIBUTE

Creates attribute of given type with value copied from managed byte array to the newly allocated unmanaged memory

Method Details

ConvertValue() public static méthode

Reads value of attribute and returns it as mechanism array
public static ConvertValue ( CK_ATTRIBUTE &attribute, CKM &value ) : void
attribute CK_ATTRIBUTE Attribute whose value should be read
value CKM Location that receives attribute value
Résultat void

ConvertValue() public static méthode

Reads value of attribute and returns it as attribute array
public static ConvertValue ( CK_ATTRIBUTE &attribute, CK_ATTRIBUTE &value ) : void
attribute CK_ATTRIBUTE Attribute whose value should be read
value CK_ATTRIBUTE Location that receives attribute value
Résultat void

ConvertValue() public static méthode

Reads value of attribute and returns it as DateTime (CK_DATE)
public static ConvertValue ( CK_ATTRIBUTE &attribute, System.DateTime &value ) : void
attribute CK_ATTRIBUTE Attribute whose value should be read
value System.DateTime Location that receives attribute value
Résultat void

ConvertValue() public static méthode

Reads value of attribute and returns it as bool
public static ConvertValue ( CK_ATTRIBUTE &attribute, bool &value ) : void
attribute CK_ATTRIBUTE Attribute whose value should be read
value bool Location that receives attribute value
Résultat void

ConvertValue() public static méthode

Reads value of attribute and returns it as byte array
public static ConvertValue ( CK_ATTRIBUTE &attribute, byte &value ) : void
attribute CK_ATTRIBUTE Attribute whose value should be read
value byte Location that receives attribute value
Résultat void

ConvertValue() public static méthode

Reads value of attribute and returns it as string
public static ConvertValue ( CK_ATTRIBUTE &attribute, string &value ) : void
attribute CK_ATTRIBUTE Attribute whose value should be read
value string Location that receives attribute value
Résultat void

ConvertValue() public static méthode

Reads value of attribute and returns it as ulong
public static ConvertValue ( CK_ATTRIBUTE &attribute, ulong &value ) : void
attribute CK_ATTRIBUTE Attribute whose value should be read
value ulong Location that receives attribute value
Résultat void

CreateAttribute() public static méthode

Creates attribute of given type with no value
public static CreateAttribute ( CKA type ) : CK_ATTRIBUTE
type CKA Attribute type
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with CKC value
public static CreateAttribute ( CKA type, CKC value ) : CK_ATTRIBUTE
type CKA Attribute type
value CKC Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with CKK value
public static CreateAttribute ( CKA type, CKK value ) : CK_ATTRIBUTE
type CKA Attribute type
value CKK Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with mechanism array value
public static CreateAttribute ( CKA type, CKM value ) : CK_ATTRIBUTE
type CKA Attribute type
value CKM Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with CKO value
public static CreateAttribute ( CKA type, CKO value ) : CK_ATTRIBUTE
type CKA Attribute type
value CKO Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with attribute array value
public static CreateAttribute ( CKA type, CK_ATTRIBUTE value ) : CK_ATTRIBUTE
type CKA Attribute type
value CK_ATTRIBUTE Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with DateTime (CK_DATE) value
public static CreateAttribute ( CKA type, System.DateTime value ) : CK_ATTRIBUTE
type CKA Attribute type
value System.DateTime Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with bool value
public static CreateAttribute ( CKA type, bool value ) : CK_ATTRIBUTE
type CKA Attribute type
value bool Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with byte array value
public static CreateAttribute ( CKA type, byte value ) : CK_ATTRIBUTE
type CKA Attribute type
value byte Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with string value
public static CreateAttribute ( CKA type, string value ) : CK_ATTRIBUTE
type CKA Attribute type
value string Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with ulong value
public static CreateAttribute ( CKA type, ulong value ) : CK_ATTRIBUTE
type CKA Attribute type
value ulong Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with no value
public static CreateAttribute ( ulong type ) : CK_ATTRIBUTE
type ulong Attribute type
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with mechanism array value
public static CreateAttribute ( ulong type, CKM value ) : CK_ATTRIBUTE
type ulong Attribute type
value CKM Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with attribute array value
public static CreateAttribute ( ulong type, CK_ATTRIBUTE value ) : CK_ATTRIBUTE
type ulong Attribute type
value CK_ATTRIBUTE Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with DateTime (CK_DATE) value
public static CreateAttribute ( ulong type, System.DateTime value ) : CK_ATTRIBUTE
type ulong Attribute type
value System.DateTime Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with bool value
public static CreateAttribute ( ulong type, bool value ) : CK_ATTRIBUTE
type ulong Attribute type
value bool Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with byte array value
public static CreateAttribute ( ulong type, byte value ) : CK_ATTRIBUTE
type ulong Attribute type
value byte Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with string value
public static CreateAttribute ( ulong type, string value ) : CK_ATTRIBUTE
type ulong Attribute type
value string Attribute value
Résultat CK_ATTRIBUTE

CreateAttribute() public static méthode

Creates attribute of given type with ulong value
public static CreateAttribute ( ulong type, ulong value ) : CK_ATTRIBUTE
type ulong Attribute type
value ulong Attribute value
Résultat CK_ATTRIBUTE