| 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) |
byte[] |
PKCS11Token.decrypt(Mechanism mechanism,
long keyHandle,
byte[] ciphertext)
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.
|
byte[][] |
PKCS11Token.decryptMessages(Mechanism mechanism,
long keyHandle,
DecryptMessageBytesEntry[] entries)
Decrypts the given ciphertexts using the given mechanism and keys.
|
int[] |
PKCS11Token.decryptMessages(Mechanism mechanism,
long keyHandle,
DecryptMessageStreamEntry[] entries)
Decrypts the given ciphertexts using the given mechanism and key.
|
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[] data)
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.
|
byte[] |
PKCS11Token.encrypt(Mechanism mechanism,
long keyHandle,
byte[] plaintext)
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.
|
byte[][] |
PKCS11Token.encryptMessages(Mechanism mechanism,
long keyHandle,
EncryptMessageBytesEntry[] entries)
Encrypts the given messages using the given mechanism and key
|
int[] |
PKCS11Token.encryptMessages(Mechanism mechanism,
long keyHandle,
EncryptMessageStreamEntry[] entries)
Encrypts the given messages using the given mechanism and key.
|
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.
|
ModuleInfo |
PKCS11Module.getInfo()
Gets information about the module; i.e.
|
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() |
long |
PKCS11Token.getObjectSize(long objectHandle)
Get the size of the specified object in bytes.
|
static byte[] |
Functions.getOctetsFromASN1BitString(byte[] encoded) |
static byte[] |
Functions.getOctetsFromASN1OctetString(byte[] encoded) |
void |
PKCS11Token.initPIN(char[] pin)
Initializes the user-PIN.
|
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).
|
void |
PKCS11Token.setPIN(char[] oldPin,
char[] newPin)
Set the user-PIN to a new value.
|
byte[] |
PKCS11Token.sign(Mechanism mechanism,
long keyHandle,
byte[] data)
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.
|
byte[][] |
PKCS11Token.signMessages(Mechanism mechanism,
long keyHandle,
SignMessageBytesEntry[] entries)
Signs the given messages using the given mechanism and key.
|
byte[][] |
PKCS11Token.signMessages(Mechanism mechanism,
long keyHandle,
SignMessageStreamEntry[] entries)
Signs the given messages using the given mechanism and key.
|
byte[] |
PKCS11Token.signRecover(Mechanism mechanism,
long keyHandle,
byte[] data)
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.
|
boolean[] |
PKCS11Token.verifyMessages(Mechanism mechanism,
long keyHandle,
VerifyMessageBytesEntry[] entries) |
boolean[] |
PKCS11Token.verifyMessages(Mechanism mechanism,
long keyHandle,
VerifyMessageStreamEntry[] entries)
Verify the signatures over given messages using the given mechanism and key.
|
byte[] |
PKCS11Token.verifyRecover(Mechanism mechanism,
long keyHandle,
byte[] data)
Verify-recovers 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.