Class Token

java.lang.Object
  |
  +--Token

public class Token
extends java.lang.Object

The logical view of a cryptographic device defined by Cryptoki.


Constructor Summary
Token(Slot slot)
           
 
Method Summary
 java.lang.String[] getTokenInfo()
          Obtains information about a particular token in the system.
 void notifyCancelFunction(Session session)
          A legacy function which return a legacy error code that define thare is no function executing in parallel in the specified session.
 void notifyCloseAllSession(Session session)
          Close all sessions an application has with a token.
 void notifyCloseSession(Session session)
          Close a session between an application and a token.
 OoctiObject notifyCopyObject(Session session, OoctiObject object)
          Copies an object, creating a new object for the copy.
 OoctiObject notifyCreateObject(Session session, Template object)
          Create a new object.
 byte[] notifyDecrypt(Session session, byte[] encryptedData)
          Decrypts a encrypted data in a single part.
 byte[] notifyDecryptDigestUpdate(Session session, byte[] encryptedPartData)
          Continues a multiple-part combine decryption and digest operation, processing another data part.
 void notifyDecryptFinal(Session session)
          Finishes a multiple-part decryption operation.
 void notifyDecryptInit(Session session, Mechanism mechanism, Key key)
          Initializes a decryption operation.
 byte[] notifyDecryptUpdate(Session session, byte[] encryptedPartData)
          Continues a multiple-part decryption operation, processing another encrypted data part.
 byte[] notifyDecryptVerifyUpdate(Session session, byte[] encryptedPartData)
          Continues a multiple-part combined decryption and verification operation, processing another data part.
 Key notifyDeriveKey(Session session, Mechanism mechanism, Key baseKey, Template template)
          Derive a key from a bese key, creating a new key object.
 void notifyDestroyObject(Session session, OoctiObject object)
          Destroy an object.
 byte[] notifyDigest(Session session, byte[] data)
          Digests data in a single part.
 byte[] notifyDigestEncryptUpdate(Session session, byte[] partData)
          Continues multiple-part digest and encryption operations, processing another data part.
 void notifyDigestFinal(Session session)
          Finishes a multiple-part message-digesting operation, returning the message digest.
 void notifyDigestInit(Session session, Mechanism mechanism)
          Initializes a message-digesting operation.
 void notifyDigestKey(Session session, SecretKey key)
          Continues a multiple-part message-digestion by digesting the value of a secret key.
 byte[] notifyDigestUpdate(Session session, byte[] partData)
          Continues a multiple-part message-digesting operation, processing another data part.
 byte[] notifyEncrypt(Session session, byte[] data)
          Encrypts single-part data.
 void notifyEncryptFinal(Session session)
          Finishes a multiple-part encryption operation.
 void notifyEncryptInit(Session session, Mechanism mechanism, Key key)
          Initialize an encryption operation.
 byte[] notifyEncryptUpdate(Session session, byte[] partData)
          Continues a multiple-part encryption operation, processing another data part.
 OoctiObject[] notifyFindObjects(Session session)
          Search for token and session objects that match a template.
 void notifyFindObjectsFinal(Session session)
          Terminates a search for token and session object.
 void notifyFindObjectsInit(Session session, Template match)
          Initializes a search for token and session object that match a template.
 Key notifyGenerateKey(Session session, Mechanism mechanism, Template template)
          Generate a secret key, creating a new key object.
 Key[] notifyGenerateKeyPair(Session session, Mechanism mechanism, Template publicKey, Template privateKey)
          Generate a public/private key pair, creating new key objects.
 char notifyGenerateRandom(Session session)
          Generates random or pseudo-random data.
 void notifyGetFunctionStatus(Session session)
          A legacy function which return a legacy error code that define thare is no function executing in parallel in the specified session.
 java.lang.String[] notifyGetOperationState(Session session)
          Obtain a copy of the cryptographic operations state of a session, encoded as a string of byte.
 Session notifyOpenSession()
          Opens a session with the Token
 void notifySeedRandom(Session session, byte[] seed)
          Mixes additional seed material into the token's random number generator.
 void notifySetOperationState(Session session, java.lang.String operationState, Key encryptionKey, Key authenticationKey)
          Restore the cryptographic operations state of a session from a string of byte obtained with getOperationState.
 byte[] notifySign(Session session, byte[] data)
          Sings data in a single part, where the signature is an appendix to the data.
 byte[] notifySignEncryptUpdate(Session session, byte[] partData)
          Continues a multiple-part combined signature and encryption operation, processing another data part.
 void notifySignFinal(Session session)
          Finishes a multiple-part signature operation, returning the signature.
 void notifySignInit(Session session, Mechanism mechanism, Key key)
          Initialize a signature operation, where the signature is an appendix to the data.
 byte[] notifySignRecover(Session session, byte[] data)
          Signs data in a single operation, where the data can be recovered from the signature.
 void notifySignRecoverInit(Session session, Mechanism mechanism, Key key)
          Initializes a signature operation, where the data can be recovered from the signature.
 byte[] notifySignUpdate(Session session, byte[] partData)
          Continue a multiple-part signature operation, processing another data part.
 Key notifyUnwrapKey(Session session, Mechanism mechanism, Key unwrappingKey, Key wrappedKey, Template template)
          Unwraps a wrapped key, creating a new private key or secret key.
 byte[] notifyVerify(Session session, byte[] data)
          Verifies a signature in a single-part operation.
 void notifyVerifyFinal(Session session)
          Finishes a multiple-part verification operation, checking the signature.
 void notifyVerifyInit(Session session, Mechanism mechanism, Key key)
          Initialize a verification operation, where the signature is an appendix to the data.
 byte[] notifyVerifyRecover(Session session, byte[] signatureData)
          Verifies a signature in a single-part operation, where the data is recovered from the signature.
 void notifyVerifyRecoverInit(Session session, Mechanism mechanism, Key key)
          Initialize a signature verification operation, where the data is recovered from the signature.
 byte[] notifyVerifyUpdate(Session session, byte[] partData)
          Continue a multiple-part verification operation, processing another data part.
 Key notifyWrapKey(Session session, Mechanism mechanism, Key wrappingKey, Key key)
          Wrap a private or secret key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Token

public Token(Slot slot)
Method Detail

getTokenInfo

public java.lang.String[] getTokenInfo()
                                throws OoctiException
Obtains information about a particular token in the system.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
SLOT_ID_INVALID -  
TOKEN_NOT_PRESENT -  
TOKEN_NOT_RECOGNIZED -  
ARGUMENTS_BAD -  

notifyOpenSession

public Session notifyOpenSession()
                          throws OoctiException
Opens a session with the Token
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FINCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
SESSION_COUNT -  
SESSION_PARALLEL_NOT_SUPPORTED -  
SESSION_READ_WRITE_SO_EXISTS -  
SLOT_ID_INVALID -  
TOKEN_NOT_PRESENT -  
TOKEN_NOT_RECOGNIZED -  
TOKEN_WRITE_PROTECTED -  
ARGUMENTS_BAD -  

notifyCloseSession

public void notifyCloseSession(Session session)
                        throws OoctiException
Close a session between an application and a token.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  

notifyCloseAllSession

public void notifyCloseAllSession(Session session)
                           throws OoctiException
Close all sessions an application has with a token.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
SESSION_HANDLE_INVALID -  
TOKEN_NOT_PRESENT -  

notifyEncryptInit

public void notifyEncryptInit(Session session,
                              Mechanism mechanism,
                              Key key)
                       throws OoctiException
Initialize an encryption operation.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
KEY_FUNCTION_NOT_PERMITED -  
KEY_HANDLE_INVALID -  
KEY_SIZE_RANGE -  
KEY_TYPE_INCONSISTENT -  
MECHANISM_INVALID -  
MECHANISM_PARAM_INVALID -  
OPERATION_ACTIVE -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
USER_NOT_LOGGED_IN -  

notifyEncrypt

public byte[] notifyEncrypt(Session session,
                            byte[] data)
                     throws OoctiException
Encrypts single-part data. The encryption operation must have been initialize with encrypInit.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DATA_INVALID -  
DATA_LEN_RANGE -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyEncryptUpdate

public byte[] notifyEncryptUpdate(Session session,
                                  byte[] partData)
                           throws OoctiException
Continues a multiple-part encryption operation, processing another data part.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DATA_LEN_RANGE -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyEncryptFinal

public void notifyEncryptFinal(Session session)
                        throws OoctiException
Finishes a multiple-part encryption operation.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DATA_LEN_RANGE -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyDecryptInit

public void notifyDecryptInit(Session session,
                              Mechanism mechanism,
                              Key key)
                       throws OoctiException
Initializes a decryption operation.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
KEY_FUNCTION_NOT_PERMITTED -  
KEY_HANDLE_INVALID -  
KEY_SIZE_RANGE -  
KEY_TYPE_INCONSISTENT -  
MECHANISM_INVALID -  
MECHANISM_PARAM_INVALID -  
OPERATION_ACTIVE -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
USER_NOT_LOGGED_IN -  
ARGUMENTS_BAD -  

notifyDecrypt

public byte[] notifyDecrypt(Session session,
                            byte[] encryptedData)
                     throws OoctiException
Decrypts a encrypted data in a single part.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
ENCRYPTED_DATA_INVALID -  
ENCRYPTED_DATA_LEN_RANGE -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyDecryptUpdate

public byte[] notifyDecryptUpdate(Session session,
                                  byte[] encryptedPartData)
                           throws OoctiException
Continues a multiple-part decryption operation, processing another encrypted data part.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
ENCRYPTED_DATA_INVALID -  
ENCRYPTED_DATA_LEN_RANGE -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyDecryptFinal

public void notifyDecryptFinal(Session session)
                        throws OoctiException
Finishes a multiple-part decryption operation.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
ENCRYPTED_DATA_INVALID -  
ENCRYPTED_DATA_LEN_RANGE -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyDigestInit

public void notifyDigestInit(Session session,
                             Mechanism mechanism)
                      throws OoctiException
Initializes a message-digesting operation.
Throws:
CRYPTKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
MECHANISM_INVALID -  
MECHANISM_PARAM_INVALID -  
OPERATION_ACTIVE -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
USER_NOT_LOGGED_IN -  
ARGUMENTS_BAD -  

notifyDigest

public byte[] notifyDigest(Session session,
                           byte[] data)
                    throws OoctiException
Digests data in a single part.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyDigestUpdate

public byte[] notifyDigestUpdate(Session session,
                                 byte[] partData)
                          throws OoctiException
Continues a multiple-part message-digesting operation, processing another data part.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyDigestKey

public void notifyDigestKey(Session session,
                            SecretKey key)
                     throws OoctiException
Continues a multiple-part message-digestion by digesting the value of a secret key.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
KEY_HANDLE_INVALID -  
KEY_INDIGESTIBLE -  
KEY_SIZE_RANGE -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANLDE_INVALID -  

notifyDigestFinal

public void notifyDigestFinal(Session session)
                       throws OoctiException
Finishes a multiple-part message-digesting operation, returning the message digest.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifySignInit

public void notifySignInit(Session session,
                           Mechanism mechanism,
                           Key key)
                    throws OoctiException
Initialize a signature operation, where the signature is an appendix to the data.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
KEY_FUNCTION_NOT_PERMITED -  
KEY_HANDLE_INVALID -  
KEY_SIZE_RANGE -  
KEY_TYPE_INCONSISTENT -  
MECHANISM_INVALID -  
MECHANISM_PARAM_INVALID -  
OPERATION_ACTIVE -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
USER_NOT_LOGGED_IN -  
ARGUMENTS_BAD -  

notifySign

public byte[] notifySign(Session session,
                         byte[] data)
                  throws OoctiException
Sings data in a single part, where the signature is an appendix to the data.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DATA_INVALID -  
DATA_LEN_RANGE -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifySignUpdate

public byte[] notifySignUpdate(Session session,
                               byte[] partData)
                        throws OoctiException
Continue a multiple-part signature operation, processing another data part.

notifySignFinal

public void notifySignFinal(Session session)
                     throws OoctiException
Finishes a multiple-part signature operation, returning the signature.

notifySignRecoverInit

public void notifySignRecoverInit(Session session,
                                  Mechanism mechanism,
                                  Key key)
                           throws OoctiException
Initializes a signature operation, where the data can be recovered from the signature.

notifySignRecover

public byte[] notifySignRecover(Session session,
                                byte[] data)
                         throws OoctiException
Signs data in a single operation, where the data can be recovered from the signature.

notifyVerifyInit

public void notifyVerifyInit(Session session,
                             Mechanism mechanism,
                             Key key)
                      throws OoctiException
Initialize a verification operation, where the signature is an appendix to the data.

notifyVerify

public byte[] notifyVerify(Session session,
                           byte[] data)
                    throws OoctiException
Verifies a signature in a single-part operation.

notifyVerifyUpdate

public byte[] notifyVerifyUpdate(Session session,
                                 byte[] partData)
                          throws OoctiException
Continue a multiple-part verification operation, processing another data part.

notifyVerifyFinal

public void notifyVerifyFinal(Session session)
                       throws OoctiException
Finishes a multiple-part verification operation, checking the signature.

notifyVerifyRecoverInit

public void notifyVerifyRecoverInit(Session session,
                                    Mechanism mechanism,
                                    Key key)
                             throws OoctiException
Initialize a signature verification operation, where the data is recovered from the signature.

notifyVerifyRecover

public byte[] notifyVerifyRecover(Session session,
                                  byte[] signatureData)
                           throws OoctiException
Verifies a signature in a single-part operation, where the data is recovered from the signature.

notifyDigestEncryptUpdate

public byte[] notifyDigestEncryptUpdate(Session session,
                                        byte[] partData)
                                 throws OoctiException
Continues multiple-part digest and encryption operations, processing another data part.

notifyDecryptDigestUpdate

public byte[] notifyDecryptDigestUpdate(Session session,
                                        byte[] encryptedPartData)
                                 throws OoctiException
Continues a multiple-part combine decryption and digest operation, processing another data part.

notifySignEncryptUpdate

public byte[] notifySignEncryptUpdate(Session session,
                                      byte[] partData)
                               throws OoctiException
Continues a multiple-part combined signature and encryption operation, processing another data part.

notifyDecryptVerifyUpdate

public byte[] notifyDecryptVerifyUpdate(Session session,
                                        byte[] encryptedPartData)
                                 throws OoctiException
Continues a multiple-part combined decryption and verification operation, processing another data part.

notifyGenerateKey

public Key notifyGenerateKey(Session session,
                             Mechanism mechanism,
                             Template template)
                      throws OoctiException
Generate a secret key, creating a new key object.

notifyGenerateKeyPair

public Key[] notifyGenerateKeyPair(Session session,
                                   Mechanism mechanism,
                                   Template publicKey,
                                   Template privateKey)
                            throws OoctiException
Generate a public/private key pair, creating new key objects.

notifyWrapKey

public Key notifyWrapKey(Session session,
                         Mechanism mechanism,
                         Key wrappingKey,
                         Key key)
                  throws OoctiException
Wrap a private or secret key.

notifyUnwrapKey

public Key notifyUnwrapKey(Session session,
                           Mechanism mechanism,
                           Key unwrappingKey,
                           Key wrappedKey,
                           Template template)
                    throws OoctiException
Unwraps a wrapped key, creating a new private key or secret key.

notifyDeriveKey

public Key notifyDeriveKey(Session session,
                           Mechanism mechanism,
                           Key baseKey,
                           Template template)
                    throws OoctiException
Derive a key from a bese key, creating a new key object.

notifySeedRandom

public void notifySeedRandom(Session session,
                             byte[] seed)
                      throws OoctiException
Mixes additional seed material into the token's random number generator.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_ACTIVE -  
RANDOM_SEED_NOT_SUPPORTED -  
RANDOM_NO_RNG -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
USER_NOT_LOGGED_IN -  
ARGUMENTS_BAD -  

notifyGenerateRandom

public char notifyGenerateRandom(Session session)
                          throws OoctiException
Generates random or pseudo-random data.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_CANCELED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_ACTIVE -  
RANDOM_NO_RNG -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
USER_NOT_LOGGED_IN -  
ARGUMENTS_BAD -  

notifyCancelFunction

public void notifyCancelFunction(Session session)
                          throws OoctiException
A legacy function which return a legacy error code that define thare is no function executing in parallel in the specified session.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
FUNCTION_FAILED -  
FUNCTION_NOT_PARALLEL -  
GENERAL_ERROR -  
HOST_MEMORY -  
SESSION_HANDLE_INVALID -  
SESSION_CLOSED -  

notifyGetFunctionStatus

public void notifyGetFunctionStatus(Session session)
                             throws OoctiException
A legacy function which return a legacy error code that define thare is no function executing in parallel in the specified session.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
FUNCTION_FAILED -  
FUNCTION_NOT_PARALLEL -  
GENERAL_ERROR -  
HOST_MEMORY -  
SESSION_HANDLE_INVALID -  
SESSION_CLOSED -  

notifyCopyObject

public OoctiObject notifyCopyObject(Session session,
                                    OoctiObject object)
                             throws OoctiException
Copies an object, creating a new object for the copy.
Throws:
ATTRIBUTE_READ_ONLY -  
ATTRIBUTE_TYPE_INVALID -  
ATTRIBUTE_TYPE_INVALID -  
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OBJECT_HANDLE_INVALID -  
SESSION_READ_ONLY -  
TEMPLATE_INCONSISTENT -  
TOKEN_WRITE_PROTECTED -  
USER_NOT_LOGGED_IN -  
ARGUMENTS_BAD -  

notifyCreateObject

public OoctiObject notifyCreateObject(Session session,
                                      Template object)
                               throws OoctiException
Create a new object. Only session object can be create during a read-only session. Only public objects can be created unless the normal user is logged in.
Throws:
ATTRIBUTE_READ_ONLY -  
ATTRIBUTE_TYPE_INVALID -  
ATTRIBUTE_VALUE_INVALID -  
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
SESSION_READ_ONLY -  
TEMPLATE_INCOMPLETE -  
TEMPLATE_INCONSISTENT -  
TOKEN_WRITE_PROTECTED -  
USER_NOT_LOGGED_IN -  
ARGUMENTS_BAD -  

notifyDestroyObject

public void notifyDestroyObject(Session session,
                                OoctiObject object)
                         throws OoctiException
Destroy an object. Only session object can be destroyed during a read-only session. Only public objects can be destroyed unless the normal user is logged in.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OBJECT_HANDLE_INVALID -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
SESSION_READ_ONLY -  
TOKEN_WRITE_PROTECTED -  

notifyFindObjectsInit

public void notifyFindObjectsInit(Session session,
                                  Template match)
                           throws OoctiException
Initializes a search for token and session object that match a template.
Throws:
ATTRIBUTE_TYPE_INVALID -  
ATTRIBUTE_VALUE_INVALID -  
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_ACTIVE -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyFindObjects

public OoctiObject[] notifyFindObjects(Session session)
                                throws OoctiException
Search for token and session objects that match a template.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -  

notifyFindObjectsFinal

public void notifyFindObjectsFinal(Session session)
                            throws OoctiException
Terminates a search for token and session object.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  

notifyGetOperationState

public java.lang.String[] notifyGetOperationState(Session session)
                                           throws OoctiException
Obtain a copy of the cryptographic operations state of a session, encoded as a string of byte.
Throws:
BUFFER_TOO_SMALL -  
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
OPERATION_NOT_INITIALIZED -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
STATE_UNSAVEABLE -  
ARGUMENTS_BAD -  

notifySetOperationState

public void notifySetOperationState(Session session,
                                    java.lang.String operationState,
                                    Key encryptionKey,
                                    Key authenticationKey)
                             throws OoctiException
Restore the cryptographic operations state of a session from a string of byte obtained with getOperationState.
Throws:
CRYPTOKI_NOT_INITIALIZED -  
DEVICE_ERROR -  
DEVICE_MEMORY -  
DEVICE_REMOVED -  
FUNCTION_FAILED -  
GENERAL_ERROR -  
HOST_MEMORY -  
KEY_CHANGED -  
KEY_NEEDED -  
KEY_NOT_NEEDED -  
SAVED_STATE_INVALID -  
SESSION_CLOSED -  
SESSION_HANDLE_INVALID -  
ARGUMENTS_BAD -