Show / Hide Table of Contents

Class TokenObject

Abstract class describes a cryptographic object located in a smart card.

Inheritance
System.Object
TokenObject
Certificate
Key
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: scmapi
Assembly: scmapi.dll
Syntax
public abstract class TokenObject

Methods

Equals(Object)

Compares two objects, checking if they refer to the same physical object in the card. This can be used to remove duplicates when calling GetObjects() multiple times. The result is valid only if the two objects have been retrieved within the same connect session.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

the object to compare with the current object.

Returns
Type Description
System.Boolean

true if the specified object is equal to the current object; otherwise, false.

Overrides
System.Object.Equals(System.Object)

GetCkId()

Gets identifier string, corresponding to the hexadecimal representation of the CKA_ID attribute of the object, as been by the PKCS#11 interface.

This value can be used to match keys and certificates that are linked together (belong in the same container).

Declaration
public string GetCkId()
Returns
Type Description
System.String

the CKA_ID attribute of the object

GetCkLabel()

Gets identifier string, corresponding to the hexadecimal representation of the CKA_LABEL attribute of the object, as been by the PKCS#11 interface.

Declaration
public string GetCkLabel()
Returns
Type Description
System.String

the CKA_LABEL attribute of the object

GetDetails()

Declaration
protected dynamic GetDetails()
Returns
Type Description
System.Object

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

GetParent()

Gets the Token object from which the object has been retrieved.

Declaration
public Token GetParent()
Returns
Type Description
Token

the Token object

GetPinNumber()

Gets index of the PIN which grants access to the object. This corresponds to the index within the GetPins() list.

For public objects (certificates and public keys), it is the PIN which grants access to the corresponding private key (association is determined by the GetCkId() attribute).

Declaration
public int GetPinNumber()
Returns
Type Description
System.Int32

the index of the pin

GetType()

Gets the type of object. Possible values are: certificate, publicKey, privateKey

Declaration
public string GetType()
Returns
Type Description
System.String

the type of the object

Back to top Generated by DocFX