PKMACBuilder (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.cert.crmf

## Class PKMACBuilder

- java.lang.Object
- - org.bouncycastle.cert.crmf.PKMACBuilder

-     public class PKMACBuilder
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PKMACBuilder(PKMACValuesCalculator calculator)`
    `PKMACBuilder(PKMACValuesCalculator calculator, int maxIterations)` Create a PKMAC builder enforcing a ceiling on the maximum iteration count.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MacCalculator` | `build(char[] password)`
    `PKMACBuilder` | `setIterationCount(int iterationCount)`
    `PKMACBuilder` | `setParameters(org.bouncycastle.asn1.cmp.PBMParameter parameters)`
    `PKMACBuilder` | `setSaltLength(int saltLength)` Set the salt length in octets.
    `PKMACBuilder` | `setSecureRandom(java.security.SecureRandom random)`

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

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

- - ### Constructor Detail

    - #### PKMACBuilder

          public PKMACBuilder(PKMACValuesCalculator calculator)

    - #### PKMACBuilder

          public PKMACBuilder(PKMACValuesCalculator calculator,
                      int maxIterations)

      Create a PKMAC builder enforcing a ceiling on the maximum iteration count.
      Parameters:
        `calculator` - supporting calculator
        `maxIterations` - max allowable value for iteration count.

  - ### Method Detail

    - #### setSaltLength

          public PKMACBuilder setSaltLength(int saltLength)

      Set the salt length in octets.
      Parameters:
        `saltLength` - length in octets of the salt to be generated.
      Returns:
        the generator

    - #### setIterationCount

          public PKMACBuilder setIterationCount(int iterationCount)

    - #### setSecureRandom

          public PKMACBuilder setSecureRandom(java.security.SecureRandom random)

    - #### setParameters

          public PKMACBuilder setParameters(org.bouncycastle.asn1.cmp.PBMParameter parameters)

    - #### build

          public MacCalculator build(char[] password)
                              throws CRMFException

      Throws:
        `CRMFException`