public class Mechanism extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Params |
params
The parameters of the mechanism.
|
protected long |
pkcs11MechanismCode
The code of the mechanism as defined in PKCS11Constants (or pkcs11t.h
likewise).
|
| Constructor and Description |
|---|
Mechanism(long pkcs11MechanismCode)
Constructor taking just the mechanism code as defined in PKCS11Constants.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object otherObject)
Override equals to check for the equality of mechanism code and
parameter.
|
static Mechanism |
get(long pkcs11MechanismCode)
Gets the mechanism specified by the given mechanism code.
|
long |
getMechanismCode()
Get the code of this mechanism as defined in PKCS11Constants (of
pkcs11t.h likewise).
|
String |
getName()
Get the name of this mechanism.
|
Params |
getParams()
Get the parameters object of this mechanism.
|
int |
hashCode()
Override hashCode to ensure that hashtable still works after overriding
equals.
|
boolean |
isDigestMechanism()
This method checks, if this mechanism is a digest mechanism.
|
boolean |
isFullEncryptDecryptMechanism()
This method checks, if this mechanism is a full
encrypt/decrypt mechanism; i.e.
|
boolean |
isFullSignVerifyMechanism()
This method checks, if this mechanism is a full
sign/verify mechanism; i.e.
|
boolean |
isKeyDerivationMechanism()
This method checks, if this mechanism is a
key derivation mechanism.
|
boolean |
isKeyGenerationMechanism()
This method checks, if this mechanism is a key
generation mechanism for generating symmetric keys.
|
boolean |
isKeyPairGenerationMechanism()
This method checks, if this mechanism is a key-pair
generation mechanism for generating key-pairs.
|
boolean |
isSignVerifyRecoverMechanism()
This method checks, if this mechanism is a sign/verify
mechanism with message recovery.
|
boolean |
isSingleOperationEncryptDecryptMechanism()
This method checks, if this mechanism is a
single-operation encrypt/decrypt mechanism; i.e.
|
boolean |
isSingleOperationSignVerifyMechanism()
This method checks, if this mechanism is a
single-operation sign/verify mechanism; i.e.
|
boolean |
isWrapUnwrapMechanism()
This method checks, if this mechanism is a
wrap/unwrap mechanism; i.e.
|
void |
setParams(Params params)
Set the parameters for this mechanism.
|
String |
toString()
Returns the string representation of this object.
|
protected long pkcs11MechanismCode
protected Params params
public Mechanism(long pkcs11MechanismCode)
pkcs11MechanismCode - The mechanism code.public static Mechanism get(long pkcs11MechanismCode)
PKCS11Constants is available.pkcs11MechanismCode - the pkcs11 mechanism codepublic boolean equals(Object otherObject)
public int hashCode()
public boolean isDigestMechanism()
public boolean isFullEncryptDecryptMechanism()
public boolean isFullSignVerifyMechanism()
public boolean isKeyDerivationMechanism()
public boolean isKeyGenerationMechanism()
public boolean isKeyPairGenerationMechanism()
public boolean isSignVerifyRecoverMechanism()
public boolean isSingleOperationEncryptDecryptMechanism()
public boolean isSingleOperationSignVerifyMechanism()
public boolean isWrapUnwrapMechanism()
public Params getParams()
public void setParams(Params params)
params - The mechanism parameters to set.public long getMechanismCode()
public String getName()
Copyright © 2018. All rights reserved.