TokenObject
public class TokenObjectextension TokenObject: HashableClass that describes a cryptographic object located in a smart card.
- 
                  
                  Returns label string, corresponding to the CKA_LABELattribute of the object, as seen by the PKCS#11 interface.DeclarationSwift public func getCkLabel() -> StringReturn ValueThe CKA_LABELattribute of the object.
- 
                  
                  Returns the identifier string, corresponding to the hexadecimal representation of the CKA_IDattribute of the object, as seen by the PKCS#11.Note:This value can be used to match keys and certificates that are linked together (inside the same container). Example:token.getObjects() { objects, error in if let error = error { print("error reason : " + error.localizedDescription) } else { if let objects = objects { for object in objects { if (object.getCkId() == certificate.getCkId() && object is PrivateKey) { // We found the private key associated with the certificate. } } } } }DeclarationSwift public func getCkId() -> StringReturn ValueThe CKA_IDattribute of the object.
- 
                  
                  Indicates whether the object is public or private (protected by PIN), corresponding to the CKA_PRIVATEattribute of the object, as seen by the PKCS#11 interface.DeclarationSwift public func isPrivate() -> BoolReturn Valuethe CKA_PRIVATEattribute of the object.
- 
                  
                  Indicates whether the object is modifiable, corresponding to the CKA_MODIFIABLEattribute of the object, as seen by the PKCS#11 interface.DeclarationSwift public func isModifiable() -> BoolReturn Valuethe CKA_MODIFIABLEattribute of the object.
- 
                  
                  Returns the index of the PIN which grants access to the private objects. This corresponds to the index within the Token.pins()array.For public objects (certificates and public keys), it is the PIN which grants access to the corresponding private key (association is determined by the TokenObject.getCkId()attribute).DeclarationSwift public func getPinNumber() -> IntReturn ValueThe index of the associated PIN. 
