Package org.xipki.pkcs11.wrapper
Class Mechanism
- java.lang.Object
-
- org.xipki.pkcs11.wrapper.Mechanism
-
public class Mechanism extends Object
Objects of this class represent a mechanism as defined in PKCS#11. There are constants defined for all mechanisms that PKCS#11 version 2.11 defines.- Author:
- Karl Scheibelhofer (SIC), Lijun Liao (xipki)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetMechanismCode()Get the code of this mechanism as defined in PKCS11Constants (of pkcs11t.h likewise).StringgetName()Get the name of this mechanism.CkParamsgetParameters()Get the parameters object of this mechanism.StringtoString()Returns the string representation of this object.StringtoString(String indent)
-
-
-
Constructor Detail
-
Mechanism
public Mechanism(long mechanismCode)
Constructor taking just the mechanism code as defined in PKCS11Constants.- Parameters:
mechanismCode- The mechanism code.
-
Mechanism
public Mechanism(long mechanismCode, CkParams parameters)Constructor taking just the mechanism code as defined in PKCS11Constants.- Parameters:
mechanismCode- The mechanism code.parameters- The mechanism parameters.
-
-
Method Detail
-
getParameters
public CkParams getParameters()
Get the parameters object of this mechanism.- Returns:
- The parameters of this mechanism. May be null.
-
getMechanismCode
public long getMechanismCode()
Get the code of this mechanism as defined in PKCS11Constants (of pkcs11t.h likewise).- Returns:
- The code of this mechanism.
-
getName
public String getName()
Get the name of this mechanism.- Returns:
- The name of this mechanism.
-
toString
public String toString()
Returns the string representation of this object.
-
-