Pkcs11Interop  5.1.2
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute Class Reference

Attribute of cryptoki object (CK_ATTRIBUTE alternative) More...

Inherits Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

Public Member Functions

object ToMarshalableStructure ()
 Returns managed object corresponding to CK_ATTRIBUTE structure that can be marshaled to an unmanaged block of memory More...
 
 ObjectAttribute (ulong type)
 Creates attribute of given type with no value More...
 
 ObjectAttribute (CKA type)
 Creates attribute of given type with no value More...
 
 ObjectAttribute (ulong type, ulong value)
 Creates attribute of given type with ulong value More...
 
 ObjectAttribute (CKA type, ulong value)
 Creates attribute of given type with ulong value More...
 
 ObjectAttribute (CKA type, CKC value)
 Creates attribute of given type with CKC value More...
 
 ObjectAttribute (CKA type, CKK value)
 Creates attribute of given type with CKK value More...
 
 ObjectAttribute (CKA type, CKO value)
 Creates attribute of given type with CKO value More...
 
ulong GetValueAsUlong ()
 Reads value of attribute and returns it as ulong More...
 
 ObjectAttribute (ulong type, bool value)
 Creates attribute of given type with bool value More...
 
 ObjectAttribute (CKA type, bool value)
 Creates attribute of given type with bool value More...
 
bool GetValueAsBool ()
 Reads value of attribute and returns it as bool More...
 
 ObjectAttribute (ulong type, string value)
 Creates attribute of given type with string value More...
 
 ObjectAttribute (CKA type, string value)
 Creates attribute of given type with string value More...
 
string GetValueAsString ()
 Reads value of attribute and returns it as string More...
 
 ObjectAttribute (ulong type, byte[] value)
 Creates attribute of given type with byte array value More...
 
 ObjectAttribute (CKA type, byte[] value)
 Creates attribute of given type with byte array value More...
 
byte [] GetValueAsByteArray ()
 Reads value of attribute and returns it as byte array More...
 
 ObjectAttribute (ulong type, DateTime value)
 Creates attribute of given type with DateTime (CK_DATE) value More...
 
 ObjectAttribute (CKA type, DateTime value)
 Creates attribute of given type with DateTime (CK_DATE) value More...
 
DateTime GetValueAsDateTime ()
 Reads value of attribute and returns it as DateTime More...
 
 ObjectAttribute (ulong type, List< IObjectAttribute > value)
 Creates attribute of given type with attribute array value More...
 
 ObjectAttribute (CKA type, List< IObjectAttribute > value)
 Creates attribute of given type with attribute array value More...
 
List< IObjectAttributeGetValueAsObjectAttributeList ()
 Reads value of attribute and returns it as attribute array More...
 
 ObjectAttribute (ulong type, List< ulong > value)
 Creates attribute of given type with ulong array value More...
 
 ObjectAttribute (CKA type, List< ulong > value)
 Creates attribute of given type with ulong array value More...
 
List< ulong > GetValueAsULongList ()
 Reads value of attribute and returns it as list of ulong More...
 
 ObjectAttribute (ulong type, List< CKM > value)
 Creates attribute of given type with mechanism array value More...
 
 ObjectAttribute (CKA type, List< CKM > value)
 Creates attribute of given type with mechanism array value More...
 
List< CKMGetValueAsCkmList ()
 Reads value of attribute and returns it as list of mechanisms More...
 
void Dispose ()
 Disposes object More...
 

Protected Member Functions

CK_ATTRIBUTE DuplicateAttribute (ref CK_ATTRIBUTE attribute)
 Creates copy of low level attribute More...
 
virtual void Dispose (bool disposing)
 Disposes object More...
 
void FreeAttribute (ref CK_ATTRIBUTE attribute)
 Frees low level attribute More...
 

Protected Attributes

bool _disposed = false
 Flag indicating whether instance has been disposed More...
 
CK_ATTRIBUTE _ckAttribute
 Low level attribute structure More...
 

Properties

ulong Type [get]
 Attribute type More...
 
bool CannotBeRead [get]
 Flag indicating whether attribute value cannot be read either because object is sensitive or unextractable or because specified attribute for the object is invalid. More...
 
- Properties inherited from Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute
ulong Type [get]
 Attribute type More...
 
bool CannotBeRead [get]
 Flag indicating whether attribute value cannot be read either because object is sensitive or unextractable or because specified attribute for the object is invalid. More...
 

Detailed Description

Attribute of cryptoki object (CK_ATTRIBUTE alternative)

Constructor & Destructor Documentation

◆ ObjectAttribute() [1/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( ulong  type)

Creates attribute of given type with no value

Parameters
typeAttribute type

◆ ObjectAttribute() [2/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type)

Creates attribute of given type with no value

Parameters
typeAttribute type

◆ ObjectAttribute() [3/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( ulong  type,
ulong  value 
)

Creates attribute of given type with ulong value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [4/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
ulong  value 
)

Creates attribute of given type with ulong value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [5/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
CKC  value 
)

Creates attribute of given type with CKC value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [6/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
CKK  value 
)

Creates attribute of given type with CKK value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [7/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
CKO  value 
)

Creates attribute of given type with CKO value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [8/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( ulong  type,
bool  value 
)

Creates attribute of given type with bool value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [9/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
bool  value 
)

Creates attribute of given type with bool value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [10/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( ulong  type,
string  value 
)

Creates attribute of given type with string value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [11/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
string  value 
)

Creates attribute of given type with string value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [12/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( ulong  type,
byte []  value 
)

Creates attribute of given type with byte array value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [13/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
byte []  value 
)

Creates attribute of given type with byte array value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [14/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( ulong  type,
DateTime  value 
)

Creates attribute of given type with DateTime (CK_DATE) value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [15/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
DateTime  value 
)

Creates attribute of given type with DateTime (CK_DATE) value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [16/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( ulong  type,
List< IObjectAttribute value 
)

Creates attribute of given type with attribute array value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [17/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
List< IObjectAttribute value 
)

Creates attribute of given type with attribute array value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [18/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( ulong  type,
List< ulong >  value 
)

Creates attribute of given type with ulong array value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [19/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
List< ulong >  value 
)

Creates attribute of given type with ulong array value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [20/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( ulong  type,
List< CKM value 
)

Creates attribute of given type with mechanism array value

Parameters
typeAttribute type
valueAttribute value

◆ ObjectAttribute() [21/21]

Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ObjectAttribute ( CKA  type,
List< CKM value 
)

Creates attribute of given type with mechanism array value

Parameters
typeAttribute type
valueAttribute value

Member Function Documentation

◆ Dispose() [1/2]

void Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.Dispose ( )

Disposes object

◆ Dispose() [2/2]

virtual void Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.Dispose ( bool  disposing)
protectedvirtual

Disposes object

Parameters
disposingFlag indicating whether managed resources should be disposed

◆ DuplicateAttribute()

CK_ATTRIBUTE Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.DuplicateAttribute ( ref CK_ATTRIBUTE  attribute)
protected

Creates copy of low level attribute

Parameters
attributeAttribute to be copied
Returns
Copy of low level attribute

◆ FreeAttribute()

void Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.FreeAttribute ( ref CK_ATTRIBUTE  attribute)
protected

Frees low level attribute

Parameters
attributeAttribute to be freed

◆ GetValueAsBool()

bool Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.GetValueAsBool ( )

Reads value of attribute and returns it as bool

Returns
Value of attribute

Implements Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

◆ GetValueAsByteArray()

byte [] Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.GetValueAsByteArray ( )

Reads value of attribute and returns it as byte array

Returns
Value of attribute

Implements Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

◆ GetValueAsCkmList()

List<CKM> Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.GetValueAsCkmList ( )

Reads value of attribute and returns it as list of mechanisms

Returns
Value of attribute

Implements Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

◆ GetValueAsDateTime()

DateTime Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.GetValueAsDateTime ( )

Reads value of attribute and returns it as DateTime

Returns
Value of attribute

Implements Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

◆ GetValueAsObjectAttributeList()

List<IObjectAttribute> Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.GetValueAsObjectAttributeList ( )

Reads value of attribute and returns it as attribute array

Returns
Value of attribute

Implements Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

◆ GetValueAsString()

string Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.GetValueAsString ( )

Reads value of attribute and returns it as string

Returns
Value of attribute

Implements Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

◆ GetValueAsUlong()

ulong Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.GetValueAsUlong ( )

Reads value of attribute and returns it as ulong

Returns
Value of attribute

Implements Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

◆ GetValueAsULongList()

List<ulong> Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.GetValueAsULongList ( )

Reads value of attribute and returns it as list of ulong

Returns
Value of attribute

Implements Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

◆ ToMarshalableStructure()

object Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.ToMarshalableStructure ( )

Returns managed object corresponding to CK_ATTRIBUTE structure that can be marshaled to an unmanaged block of memory

Returns
A managed object holding the data to be marshaled. This object must be an instance of a formatted class.

Implements Net.Pkcs11Interop.HighLevelAPI.IObjectAttribute.

Member Data Documentation

◆ _ckAttribute

CK_ATTRIBUTE Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute._ckAttribute
protected

Low level attribute structure

◆ _disposed

bool Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute._disposed = false
protected

Flag indicating whether instance has been disposed

Property Documentation

◆ CannotBeRead

bool Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.CannotBeRead
get

Flag indicating whether attribute value cannot be read either because object is sensitive or unextractable or because specified attribute for the object is invalid.

◆ Type

ulong Net.Pkcs11Interop.HighLevelAPI80.ObjectAttribute.Type
get

Attribute type


The documentation for this class was generated from the following file: