Package org.bouncycastle.pqc.crypto.xmss

## Class XMSSPrivateKeyParameters

- java.lang.Object
- - org.bouncycastle.crypto.params.AsymmetricKeyParameter
  - - org.bouncycastle.pqc.crypto.xmss.XMSSKeyParameters
    - - org.bouncycastle.pqc.crypto.xmss.XMSSPrivateKeyParameters

- All Implemented Interfaces:
    `CipherParameters`, `XMSSStoreableObjectInterface`, `Encodable`

      public final class XMSSPrivateKeyParameters
      extends XMSSKeyParameters
      implements XMSSStoreableObjectInterface, Encodable

  XMSS Private Key.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `XMSSPrivateKeyParameters.Builder` |

  - ### Field Summary

    - ### Fields inherited from class org.bouncycastle.pqc.crypto.xmss.XMSSKeyParameters

      `SHA_256, SHA_512, SHAKE128, SHAKE256`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `XMSSPrivateKeyParameters` | `extractKeyShard​(int usageCount)` | Return a key that can be used usageCount times.
    `byte[]` | `getEncoded()` | Return a byte array representing the implementing object.
    `int` | `getIndex()` |
    `XMSSPrivateKeyParameters` | `getNextKey()` |
    `XMSSParameters` | `getParameters()` |
    `byte[]` | `getPublicSeed()` |
    `byte[]` | `getRoot()` |
    `byte[]` | `getSecretKeyPRF()` |
    `byte[]` | `getSecretKeySeed()` |
    `long` | `getUsagesRemaining()` |
    `byte[]` | `toByteArray()` | Deprecated. use getEncoded() - this method will become private.

    - ### Methods inherited from class org.bouncycastle.pqc.crypto.xmss.XMSSKeyParameters

      `getTreeDigest`

    - ### Methods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter

      `isPrivate`

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

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

- - ### Method Detail

    - #### getUsagesRemaining

          public long getUsagesRemaining()

    - #### getEncoded

          public byte[] getEncoded()
                            throws java.io.IOException

      Description copied from interface: `Encodable`
      Return a byte array representing the implementing object.
      Specified by:
        `getEncoded` in interface `Encodable`
      Returns:
        a byte array representing the encoding.
      Throws:
        `java.io.IOException` - if an issue arises generation the encoding.

    - #### getNextKey

          public XMSSPrivateKeyParameters getNextKey()

    - #### extractKeyShard

          public XMSSPrivateKeyParameters extractKeyShard​(int usageCount)

      Return a key that can be used usageCount times.

      Note: this will use the range [index...index + usageCount) for the current key.

      Parameters:
        `usageCount` - the number of usages the key should have.
      Returns:
        a key based on the current key that can be used usageCount times.

    - #### toByteArray

          public byte[] toByteArray()

      Deprecated.
      use getEncoded() - this method will become private.
      Description copied from interface: `XMSSStoreableObjectInterface`
      Create byte representation of object.
      Specified by:
        `toByteArray` in interface `XMSSStoreableObjectInterface`
      Returns:
        Byte representation of object.

    - #### getIndex

          public int getIndex()

    - #### getSecretKeySeed

          public byte[] getSecretKeySeed()

    - #### getSecretKeyPRF

          public byte[] getSecretKeyPRF()

    - #### getPublicSeed

          public byte[] getPublicSeed()

    - #### getRoot

          public byte[] getRoot()

    - #### getParameters

          public XMSSParameters getParameters()