Class Mechanism


  • public class Mechanism
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      Mechanism​(long mechanismCode)
      Constructor taking just the mechanism code as defined in PKCS11Constants.
      Mechanism​(long mechanismCode, CkParams parameters)
      Constructor taking just the mechanism code as defined in PKCS11Constants.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getMechanismCode()
      Get the code of this mechanism as defined in PKCS11Constants (of pkcs11t.h likewise).
      java.lang.String getName()
      Get the name of this mechanism.
      CkParams getParameters()
      Get the parameters object of this mechanism.
      java.lang.String toString()
      Returns the string representation of this object.
      java.lang.String toString​(java.lang.String indent)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 java.lang.String getName()
        Get the name of this mechanism.
        Returns:
        The name of this mechanism.
      • toString

        public java.lang.String toString()
        Returns the string representation of this object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string representation of this object
      • toString

        public java.lang.String toString​(java.lang.String indent)