| Package | Description |
|---|---|
| org.xipki.pkcs11.wrapper |
| Modifier and Type | Method and Description |
|---|---|
void |
Session.closeSession()
Closes this session.
|
long |
Session.copyObject(long sourceObjectHandle,
AttributeVector template)
Copy an existing object.
|
long |
Session.createObject(AttributeVector template)
Create a new object on the token (or in the session).
|
int |
Session.decrypt(byte[] in,
byte[] out,
int outOfs,
int outLen)
Decrypts the given data with the key and mechanism given to the decryptInit method.
|
int |
Session.decrypt(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Decrypts the given data with the key and mechanism given to the decryptInit method.
|
int |
Session.decryptFinal(byte[] out,
int outOfs,
int outLen)
This method finalizes a decryption operation and returns the final result.
|
void |
Session.decryptInit(Mechanism mechanism,
long keyHandle)
Initializes a new decryption operation.
|
int |
Session.decryptUpdate(byte[] in,
byte[] out,
int outOfs,
int outLen)
This method can be used to decrypt multiple pieces of data; e.g.
|
int |
Session.decryptUpdate(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
This method can be used to decrypt multiple pieces of data; e.g.
|
long |
Session.deriveKey(Mechanism mechanism,
long baseKeyHandle,
AttributeVector template)
Derives a new key from a specified base key using the given mechanism.
|
void |
Session.destroyObject(long objectHandle)
Destroy a certain object on the token (or in the session).
|
int |
Session.digest(Mechanism mechanism,
byte[] in,
byte[] out,
int outOfs,
int outLen)
Digests the given data with the mechanism given to the digestInit method.
|
int |
Session.digest(Mechanism mechanism,
byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Digests the given data with the mechanism given to the digestInit method.
|
int |
Session.digestFinal(byte[] in,
byte[] out,
int outOfs,
int outLen)
Digests the given data with the mechanism given to the digestInit method.
|
int |
Session.digestFinal(byte[] out,
int outOfs,
int outLen)
This method finalizes a digesting operation and returns the final result.
|
int |
Session.digestFinal(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Digests the given data with the mechanism given to the digestInit method.
|
void |
Session.digestInit(Mechanism mechanism)
Initializes a new digesting operation.
|
void |
Session.digestKey(long keyHandle)
This method is similar to digestUpdate and can be combined with it during one digesting
operation.
|
void |
Session.digestUpdate(byte[] in)
This method can be used to digest multiple pieces of data; e.g.
|
void |
Session.digestUpdate(byte[] in,
int inOfs,
int inLen)
This method can be used to digest multiple pieces of data; e.g.
|
int |
Session.encrypt(byte[] in,
byte[] out,
int outOfs,
int outLen)
Encrypts the given data with the key and mechanism given to the encryptInit method.
|
int |
Session.encrypt(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Encrypts the given data with the key and mechanism given to the encryptInit method.
|
int |
Session.encryptFinal(byte[] out,
int outOfs,
int outLen)
This method finalizes an encrpytion operation and returns the final result.
|
void |
Session.encryptInit(Mechanism mechanism,
long keyHandle)
Initializes a new encryption operation.
|
int |
Session.encryptUpdate(byte[] in,
byte[] out,
int outOfs,
int outLen)
This method can be used to encrypt multiple pieces of data; e.g.
|
int |
Session.encryptUpdate(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
This method can be used to encrypt multiple pieces of data; e.g.
|
void |
PKCS11Module.finalize(java.lang.Object args)
Caution:
Unlike the original PKCS#11 wrapper, we only call initialize() once per
native .so/.dll.
|
long[] |
Session.findObjects(int maxObjectCount)
Finds objects that match the template object passed to findObjectsInit.
|
void |
Session.findObjectsFinal()
Finalizes a find operation.
|
void |
Session.findObjectsInit(AttributeVector template)
Initializes a find operations that provides means to find objects by passing a template object.
|
long |
Session.generateKey(Mechanism mechanism,
AttributeVector template)
/**
Generate a new secret key or a set of domain parameters.
|
PKCS11KeyPair |
Session.generateKeyPair(Mechanism mechanism,
KeyPairTemplate template)
Generate a new public key - private key key-pair and use the set attributes of the template
objects for setting the attributes of the new public key and private key objects.
|
byte[] |
Session.generateRandom(int numberOfBytesToGenerate)
Generates a certain number of random bytes.
|
java.lang.Object |
Session.getAttrValue(long objectHandle,
long attributeType) |
AttributeVector |
Session.getAttrValues(long objectHandle,
long... attributeTypes) |
java.math.BigInteger |
Session.getBigIntAttrValue(long objectHandle,
long attributeType) |
java.lang.Boolean |
Session.getBooleanAttrValue(long objectHandle,
long attributeType) |
byte[] |
Session.getByteArrayAttrValue(long objectHandle,
long attributeType) |
java.lang.Long |
Session.getCkaCertificateType(long objectHandle) |
java.lang.Long |
Session.getCkaClass(long objectHandle) |
byte[] |
Session.getCkaId(long objectHandle) |
java.lang.Long |
Session.getCkaKeyType(long objectHandle) |
java.lang.String |
Session.getCkaLabel(long objectHandle) |
ModuleInfo |
PKCS11Module.getInfo()
Gets information about the module; i.e.
|
java.lang.Integer |
Session.getIntAttrValue(long objectHandle,
long attributeType) |
java.lang.Long |
Session.getLongAttrValue(long objectHandle,
long attributeType) |
MechanismInfo |
Token.getMechanismInfo(long mechanism)
Get more information about one supported mechanism.
|
long[] |
Token.getMechanismList()
Get the list of mechanisms that this token supports.
|
byte[] |
Session.getOperationState()
Get the current operation state.
|
SessionInfo |
Session.getSessionInfo()
Get information about this session.
|
SlotInfo |
Slot.getSlotInfo()
Get information about this slot object.
|
Slot[] |
PKCS11Module.getSlotList(boolean tokenPresent)
Gets a list of slots that can accept tokens that are compatible with this
module; e.g.
|
java.lang.String |
Session.getStringAttrValue(long objectHandle,
long attributeType) |
Token |
Slot.getToken()
Get an object for handling the token that is currently present in this
slot, or null, if there is no token present.
|
TokenInfo |
Token.getTokenInfo()
Get information about this token.
|
void |
Session.login(long userType,
char[] pin)
Logs in the user or the security officer to the session.
|
void |
Session.logout()
Logs out this session.
|
Session |
Token.openSession(boolean rwSession)
Open a new session to perform operations on this token.
|
Session |
Token.openSession(boolean rwSession,
java.lang.Object application)
Open a new session to perform operations on this token.
|
void |
Session.seedRandom(byte[] seed)
Mixes additional seeding material into the random number generator.
|
void |
Session.setAttributeValues(long objectToUpdateHandle,
AttributeVector template)
Gets all present attributes of the given template object an writes them to the object to update
on the token (or in the session).
|
void |
Session.setOperationState(byte[] operationState,
long encryptionKeyHandle,
long authenticationKeyHandle)
Sets the operation state of this session to a previously saved one.
|
byte[] |
Session.sign(byte[] data)
Signs the given data with the key and mechanism given to the signInit method.
|
byte[] |
Session.signFinal()
This method finalizes a signing operation and returns the final result.
|
void |
Session.signInit(Mechanism mechanism,
long keyHandle)
Initializes a new signing operation.
|
int |
Session.signRecover(byte[] in,
byte[] out,
int outOfs,
int outLen)
Signs the given data with the key and mechanism given to the signRecoverInit method.
|
int |
Session.signRecover(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Signs the given data with the key and mechanism given to the signRecoverInit method.
|
void |
Session.signRecoverInit(Mechanism mechanism,
long keyHandle)
Initializes a new signing operation for signing with recovery.
|
void |
Session.signUpdate(byte[] in)
This method can be used to sign multiple pieces of data; e.g.
|
void |
Session.signUpdate(byte[] in,
int inOfs,
int inLen)
This method can be used to sign multiple pieces of data; e.g.
|
long |
Session.unwrapKey(Mechanism mechanism,
long unwrappingKeyHandle,
byte[] wrappedKey,
AttributeVector keyTemplate)
Unwraps (decrypts) the given encrypted key with the unwrapping key using the given mechanism.
|
void |
Session.verify(byte[] data,
byte[] signature)
Verifies the given signature against the given data with the key and mechanism given to the
verifyInit method.
|
void |
Session.verifyFinal(byte[] signature)
This method finalizes a verification operation.
|
void |
Session.verifyInit(Mechanism mechanism,
long keyHandle)
Initializes a new verification operation.
|
int |
Session.verifyRecover(byte[] in,
byte[] out,
int outOfs,
int outLen)
Verifies the given data with the key and mechanism given to the verifyRecoverInit method.
|
int |
Session.verifyRecover(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Verifies the given data with the key and mechanism given to the verifyRecoverInit method.
|
void |
Session.verifyRecoverInit(Mechanism mechanism,
long keyHandle)
Initializes a new verification operation for verification with data recovery.
|
void |
Session.verifyUpdate(byte[] in)
This method can be used to verify a signature with multiple pieces of data; e.g.
|
void |
Session.verifyUpdate(byte[] in,
int inOfs,
int inLen)
This method can be used to verify a signature with multiple pieces of data; e.g.
|
byte[] |
Session.wrapKey(Mechanism mechanism,
long wrappingKeyHandle,
long keyHandle)
Wraps (encrypts) the given key with the wrapping key using the given mechanism.
|
Copyright © 2023. All rights reserved.