Package org.bouncycastle.pqc.jcajce.provider.xmss

## Class XMSSMTSignatureSpi

- java.lang.Object
- - java.security.SignatureSpi
  - - java.security.Signature
    - - org.bouncycastle.pqc.jcajce.provider.xmss.XMSSMTSignatureSpi

- All Implemented Interfaces:
    `StateAwareSignature`
  Direct Known Subclasses:
    `XMSSMTSignatureSpi.generic`, `XMSSMTSignatureSpi.withSha256`, `XMSSMTSignatureSpi.withSha256andPrehash`, `XMSSMTSignatureSpi.withSha512`, `XMSSMTSignatureSpi.withSha512andPrehash`, `XMSSMTSignatureSpi.withShake128`, `XMSSMTSignatureSpi.withShake128andPrehash`, `XMSSMTSignatureSpi.withShake256`, `XMSSMTSignatureSpi.withShake256andPrehash`

      public class XMSSMTSignatureSpi
      extends java.security.Signature
      implements StateAwareSignature

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `XMSSMTSignatureSpi.generic` |
    `static class` | `XMSSMTSignatureSpi.withSha256` |
    `static class` | `XMSSMTSignatureSpi.withSha256andPrehash` |
    `static class` | `XMSSMTSignatureSpi.withSha512` |
    `static class` | `XMSSMTSignatureSpi.withSha512andPrehash` |
    `static class` | `XMSSMTSignatureSpi.withShake128` |
    `static class` | `XMSSMTSignatureSpi.withShake128andPrehash` |
    `static class` | `XMSSMTSignatureSpi.withShake256` |
    `static class` | `XMSSMTSignatureSpi.withShake256andPrehash` |

  - ### Field Summary

    - ### Fields inherited from class java.security.Signature

      `SIGN, state, UNINITIALIZED, VERIFY`

    - ### Fields inherited from class java.security.SignatureSpi

      `appRandom`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `XMSSMTSignatureSpi​(java.lang.String algorithm)` |
    `protected` | `XMSSMTSignatureSpi​(java.lang.String sigName, Digest digest, XMSSMTSigner signer)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected java.lang.Object` | `engineGetParameter​(java.lang.String param)` | Deprecated.
    `protected void` | `engineInitSign​(java.security.PrivateKey privateKey)` |
    `protected void` | `engineInitSign​(java.security.PrivateKey privateKey, java.security.SecureRandom random)` |
    `protected void` | `engineInitVerify​(java.security.PublicKey publicKey)` |
    `protected void` | `engineSetParameter​(java.lang.String param, java.lang.Object value)` | Deprecated. replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)
    `protected void` | `engineSetParameter​(java.security.spec.AlgorithmParameterSpec params)` |
    `protected byte[]` | `engineSign()` |
    `protected void` | `engineUpdate​(byte b)` |
    `protected void` | `engineUpdate​(byte[] b, int off, int len)` |
    `protected boolean` | `engineVerify​(byte[] sigBytes)` |
    `java.security.PrivateKey` | `getUpdatedPrivateKey()` | Return the current version of the private key with the updated state.
    `boolean` | `isSigningCapable()` | Return true if this Signature object can be used for signing.

    - ### Methods inherited from class java.security.Signature

      `clone, getAlgorithm, getInstance, getInstance, getInstance, getParameter, getParameters, getProvider, initSign, initSign, initVerify, initVerify, setParameter, setParameter, sign, sign, toString, update, update, update, update, verify, verify`

    - ### Methods inherited from class java.security.SignatureSpi

      `engineGetParameters, engineSign, engineUpdate, engineVerify`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.bouncycastle.pqc.jcajce.interfaces.StateAwareSignature

      `getAlgorithm, initSign, initSign, initVerify, initVerify, sign, sign, update, update, update, update, verify, verify`

- - ### Constructor Detail

    - #### XMSSMTSignatureSpi

          protected XMSSMTSignatureSpi​(java.lang.String algorithm)

    - #### XMSSMTSignatureSpi

          protected XMSSMTSignatureSpi​(java.lang.String sigName,
                                       Digest digest,
                                       XMSSMTSigner signer)

  - ### Method Detail

    - #### engineInitVerify

          protected void engineInitVerify​(java.security.PublicKey publicKey)
                                   throws java.security.InvalidKeyException

      Specified by:
        `engineInitVerify` in class `java.security.SignatureSpi`
      Throws:
        `java.security.InvalidKeyException`

    - #### engineInitSign

          protected void engineInitSign​(java.security.PrivateKey privateKey,
                                        java.security.SecureRandom random)
                                 throws java.security.InvalidKeyException

      Overrides:
        `engineInitSign` in class `java.security.SignatureSpi`
      Throws:
        `java.security.InvalidKeyException`

    - #### engineInitSign

          protected void engineInitSign​(java.security.PrivateKey privateKey)
                                 throws java.security.InvalidKeyException

      Specified by:
        `engineInitSign` in class `java.security.SignatureSpi`
      Throws:
        `java.security.InvalidKeyException`

    - #### engineUpdate

          protected void engineUpdate​(byte b)
                               throws java.security.SignatureException

      Specified by:
        `engineUpdate` in class `java.security.SignatureSpi`
      Throws:
        `java.security.SignatureException`

    - #### engineUpdate

          protected void engineUpdate​(byte[] b,
                                      int off,
                                      int len)
                               throws java.security.SignatureException

      Specified by:
        `engineUpdate` in class `java.security.SignatureSpi`
      Throws:
        `java.security.SignatureException`

    - #### engineSign

          protected byte[] engineSign()
                               throws java.security.SignatureException

      Specified by:
        `engineSign` in class `java.security.SignatureSpi`
      Throws:
        `java.security.SignatureException`

    - #### engineVerify

          protected boolean engineVerify​(byte[] sigBytes)
                                  throws java.security.SignatureException

      Specified by:
        `engineVerify` in class `java.security.SignatureSpi`
      Throws:
        `java.security.SignatureException`

    - #### engineSetParameter

          protected void engineSetParameter​(java.security.spec.AlgorithmParameterSpec params)

      Overrides:
        `engineSetParameter` in class `java.security.SignatureSpi`

    - #### engineSetParameter

          protected void engineSetParameter​(java.lang.String param,
                                            java.lang.Object value)

      Deprecated.
      replaced with #engineSetParameter(java.security.spec.AlgorithmParameterSpec)
      Specified by:
        `engineSetParameter` in class `java.security.SignatureSpi`

    - #### engineGetParameter

          protected java.lang.Object engineGetParameter​(java.lang.String param)

      Deprecated.
      Specified by:
        `engineGetParameter` in class `java.security.SignatureSpi`

    - #### isSigningCapable

          public boolean isSigningCapable()

      Description copied from interface: `StateAwareSignature`
      Return true if this Signature object can be used for signing. False otherwise.
      Specified by:
        `isSigningCapable` in interface `StateAwareSignature`
      Returns:
        true if we are capable of making signatures.

    - #### getUpdatedPrivateKey

          public java.security.PrivateKey getUpdatedPrivateKey()

      Description copied from interface: `StateAwareSignature`
      Return the current version of the private key with the updated state.

      Note: calling this method will effectively disable the Signature object from being used for further signature generation without another call to initSign().

      Specified by:
        `getUpdatedPrivateKey` in interface `StateAwareSignature`
      Returns:
        an updated private key object, which can be used for later signature generation.