DataContainer

public final class DataContainer : TokenObject

Class that describes a data container object. Inherits from TokenObject.

  • Gets the application name of the data container, corresponding to the CKA_APPLICATION attribute of the object, as seen by the PKCS#11 interface.

    Declaration

    Swift

    public func getApplication() -> String

    Return Value

    the CKA_APPLICATION attribute of the data container.

  • Retrieves the data container data value.

    Declaration

    Swift

    public func getValue(completionHandler: @escaping (_ data: Data?, _ error: NSError?) -> Void)

    Parameters

    completionHandler

    The completion handler block to be called as soon as the operation has been performed. It takes the following parameters:

    • data: the data container data value.
    • error: nil if the operation is successful; otherwise an error encapsulates the reason of failure.

    Note

    The completion handler is executed on the same type of DispatchQueue as in the calling code.

  • Modifies the data container data value.

    Declaration

    Swift

    public func setValue(data: Data, completionHandler: @escaping (_ error: NSError?) -> Void)

    Parameters

    data

    the new data value

    completionHandler

    The completion handler block to be called as soon as the operation has been performed. It takes the following parameter:

    • error: nil if the operation is successful; otherwise an error encapsulates the reason of failure.

    Note

    The completion handler is executed on the same type of DispatchQueue as in the calling code.