Class 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)
    • 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

      • setModule

        public void setModule​(PKCS11Module module)
      • 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.
        Overrides:
        toString in class Object
        Returns:
        the string representation of this object