PKCS12KeyWithParameters (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.jcajce

## Class PKCS12KeyWithParameters

- java.lang.Object
- - org.bouncycastle.jcajce.PKCS12Key
  - - org.bouncycastle.jcajce.PKCS12KeyWithParameters

- All Implemented Interfaces:
    java.io.Serializable, java.security.Key, javax.crypto.interfaces.PBEKey, javax.crypto.SecretKey

      public class PKCS12KeyWithParameters
      extends PKCS12Key
      implements javax.crypto.interfaces.PBEKey

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface javax.crypto.interfaces.PBEKey

      `serialVersionUID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PKCS12KeyWithParameters(char[] password, byte[] salt, int iterationCount)` Basic constructor for a password based key with generation parameters.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getIterationCount()`
    `byte[]` | `getSalt()`

    - ### Methods inherited from class org.bouncycastle.jcajce.PKCS12Key

      `getAlgorithm, getEncoded, getFormat, getPassword`

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

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

    - ### Methods inherited from interface javax.crypto.interfaces.PBEKey

      `getPassword`

    - ### Methods inherited from interface java.security.Key

      `getAlgorithm, getEncoded, getFormat`

- - ### Constructor Detail

    - #### PKCS12KeyWithParameters

          public PKCS12KeyWithParameters(char[] password,
                                 byte[] salt,
                                 int iterationCount)

      Basic constructor for a password based key with generation parameters.
      Parameters:
        `password` - password to use.
        `salt` - salt for generation algorithm
        `iterationCount` - iteration count for generation algorithm.

  - ### Method Detail

    - #### getSalt

          public byte[] getSalt()

      Specified by:
        `getSalt` in interface `javax.crypto.interfaces.PBEKey`

    - #### getIterationCount

          public int getIterationCount()

      Specified by:
        `getIterationCount` in interface `javax.crypto.interfaces.PBEKey`