| Package | Description |
|---|---|
| org.xipki.pkcs11.wrapper |
| Modifier and Type | Class and Description |
|---|---|
class |
PKCS11Exception
This is the superclass of all checked exceptions used by this package.
|
| Modifier and Type | Method and Description |
|---|---|
long |
PKCS11Token.copyObject(long sourceObjectHandle,
AttributeVector template)
Copy an existing object.
|
long |
PKCS11Token.createECPrivateKeyObject(AttributeVector template,
byte[] ecPoint)
Create EC private key object in the PKCS#11 device.
|
long |
PKCS11Token.createObject(AttributeVector template)
Create a new object on the token (or in the session).
|
long |
PKCS11Token.createPrivateKeyObject(AttributeVector template,
PublicKey publicKey) |
int |
PKCS11Token.decrypt(Mechanism mechanism,
long keyHandle,
byte[] in,
byte[] out)
Decrypts the given data with the key and mechanism.
|
int |
PKCS11Token.decrypt(Mechanism mechanism,
long keyHandle,
byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Decrypts the given data with the key and mechanism.
|
int |
PKCS11Token.decrypt(OutputStream out,
Mechanism mechanism,
long keyHandle,
InputStream ciphertext)
This method can be used to decrypt large data.
|
long |
PKCS11Token.deriveKey(Mechanism mechanism,
long baseKeyHandle,
AttributeVector template)
Derives a new key from a specified base key using the given mechanism.
|
void |
PKCS11Token.destroyObject(long objectHandle)
Destroy a certain object on the token (or in the session).
|
List<Long> |
PKCS11Token.destroyObjects(List<Long> objectHandles) |
long[] |
PKCS11Token.destroyObjects(long... objectHandles)
Destroy a certain object on the token (or in the session).
|
byte[] |
PKCS11Token.digest(Mechanism mechanism,
byte[] in)
Digests the given data with the mechanism.
|
byte[] |
PKCS11Token.digest(Mechanism mechanism,
byte[] in,
int inOfs,
int inLen)
Digests the given data with the mechanism.
|
byte[] |
PKCS11Token.digest(Mechanism mechanism,
InputStream data)
Digests the large data with the mechanism.
|
byte[] |
PKCS11Token.digestKey(Mechanism mechanism,
long keyHandle)
Digests the given key with the mechanism.
|
int |
PKCS11Token.encrypt(Mechanism mechanism,
long keyHandle,
byte[] in,
byte[] out)
Encrypts the given data with the key and mechanism.
|
int |
PKCS11Token.encrypt(Mechanism mechanism,
long keyHandle,
byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Encrypts the given data with the key and mechanism.
|
int |
PKCS11Token.encrypt(OutputStream out,
Mechanism mechanism,
long keyHandle,
InputStream plaintext)
This method can be used to encrypt large data.
|
long[] |
PKCS11Token.findAllObjects(AttributeVector template)
Finds all objects that match the template.
|
long[] |
PKCS11Token.findObjects(AttributeVector template,
int maxObjectCount)
Finds objects that match the template.
|
long |
PKCS11Token.generateKey(Mechanism mechanism,
AttributeVector template)
Generate a new secret key or a set of domain parameters.
|
PKCS11KeyPair |
PKCS11Token.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[] |
PKCS11Token.generateRandom(int numberOfBytesToGenerate)
Generates a certain number of random bytes.
|
byte[] |
PKCS11Token.generateRandom(int numberOfBytesToGenerate,
byte[] extraSeed)
Generates a certain number of random bytes.
|
byte[] |
PKCS11Token.generateUniqueId(AttributeVector template,
int idLength,
Random random)
Generate a unique CKA_ID.
|
AttributeVector |
PKCS11Token.getAttrValues(long objectHandle,
List<Long> attributeTypes)
Gets give attributes for the given object handle.
|
AttributeVector |
PKCS11Token.getAttrValues(long objectHandle,
long... attributeTypes)
Gets give attributes for the given object handle.
|
AttributeVector |
PKCS11Token.getDefaultAttrValues(long objectHandle)
Gets all attributes for the given object handle.
|
PKCS11Key |
PKCS11Token.getKey(AttributeVector criteria)
Gets the
PKCS11Key of a key satisfying the given criteria. |
PKCS11Key |
PKCS11Token.getKey(PKCS11KeyId keyId)
Gets the
PKCS11Key identified by the given PKCS11KeyId. |
PKCS11KeyId |
PKCS11Token.getKeyId(AttributeVector criteria)
Gets the
PKCS11KeyId of a key satisfying the given criteria. |
String |
PKCS11Token.getModuleInfo() |
static byte[] |
Functions.getOctetsFromASN1BitString(byte[] encoded) |
static byte[] |
Functions.getOctetsFromASN1OctetString(byte[] encoded) |
void |
PKCS11Module.initialize()
Initializes the module.
|
void |
PKCS11Token.logInSecurityOfficer(char[] userName,
char[] pin)
Login this session as CKU_SO (Security Officer).
|
void |
PKCS11Token.logout()
Logs out this session.
|
void |
PKCS11Token.setAttributeValues(long objectToUpdateHandle,
AttributeVector template)
Gets all present attributes of the given template object and writes them to the object to update
on the token (or in the session).
|
byte[] |
PKCS11Token.sign(Mechanism mechanism,
long keyHandle,
byte[] in)
Signs the given data with the key and mechanism.
|
byte[] |
PKCS11Token.sign(Mechanism mechanism,
long keyHandle,
byte[] in,
int inOfs,
int inLen)
Signs the given data with the key and mechanism.
|
byte[] |
PKCS11Token.sign(Mechanism mechanism,
long keyHandle,
InputStream data)
This method can be used to sign large data.
|
int |
PKCS11Token.signRecover(Mechanism mechanism,
long keyHandle,
byte[] in,
byte[] out)
Sign-recovers the given data with the key and mechanism.
|
int |
PKCS11Token.signRecover(Mechanism mechanism,
long keyHandle,
byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Sign-recovers the given data with the key and mechanism.
|
long |
PKCS11Token.unwrapKey(Mechanism mechanism,
long unwrappingKeyHandle,
byte[] wrappedKey,
AttributeVector keyTemplate)
Unwraps (decrypts) the given encrypted key with the unwrapping key using the given mechanism.
|
boolean |
PKCS11Token.verify(Mechanism mechanism,
long keyHandle,
byte[] data,
byte[] signature)
Verifies the given signature against the given data with the key and mechanism.
|
boolean |
PKCS11Token.verify(Mechanism mechanism,
long keyHandle,
InputStream data,
byte[] signature)
This method can be used to verify large data.
|
int |
PKCS11Token.verifyRecover(Mechanism mechanism,
long keyHandle,
byte[] in,
byte[] out)
Verifies the given data with the key and mechanism.
|
int |
PKCS11Token.verifyRecover(Mechanism mechanism,
long keyHandle,
byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs,
int outLen)
Verifies the given data with the key and mechanism.
|
byte[] |
PKCS11Token.wrapKey(Mechanism mechanism,
long wrappingKeyHandle,
long keyHandle)
Wraps (encrypts) the given key with the wrapping key using the given mechanism.
|
| Constructor and Description |
|---|
PKCS11Token(Token token,
boolean readOnly,
char[] pin)
The simple constructor.
|
PKCS11Token(Token token,
boolean readOnly,
long userType,
char[] userName,
List<char[]> pins,
Integer numSessions)
The advanced constructor.
|
Copyright © 2023. All rights reserved.