Class JcePBMac1CalculatorBuilder

java.lang.Object
org.bouncycastle.pkcs.jcajce.JcePBMac1CalculatorBuilder

public class JcePBMac1CalculatorBuilder extends Object
A builder for RFC 8018 PBE based MAC calculators.

By default the class uses HMAC-SHA256 as the PRF, with an iteration count of 8192. The default salt length is the output size of the MAC being used.

  • Field Details

    • PRF_SHA224

      public static final org.bouncycastle.asn1.x509.AlgorithmIdentifier PRF_SHA224
    • PRF_SHA256

      public static final org.bouncycastle.asn1.x509.AlgorithmIdentifier PRF_SHA256
    • PRF_SHA384

      public static final org.bouncycastle.asn1.x509.AlgorithmIdentifier PRF_SHA384
    • PRF_SHA512

      public static final org.bouncycastle.asn1.x509.AlgorithmIdentifier PRF_SHA512
    • PRF_SHA3_224

      public static final org.bouncycastle.asn1.x509.AlgorithmIdentifier PRF_SHA3_224
    • PRF_SHA3_256

      public static final org.bouncycastle.asn1.x509.AlgorithmIdentifier PRF_SHA3_256
    • PRF_SHA3_384

      public static final org.bouncycastle.asn1.x509.AlgorithmIdentifier PRF_SHA3_384
    • PRF_SHA3_512

      public static final org.bouncycastle.asn1.x509.AlgorithmIdentifier PRF_SHA3_512
  • Constructor Details

    • JcePBMac1CalculatorBuilder

      public JcePBMac1CalculatorBuilder(String macAlgorithm, int keySize)
      Base constructor - MAC name and key size.
      Parameters:
      macAlgorithm - name of the MAC algorithm.
      keySize - the key size in bits.
    • JcePBMac1CalculatorBuilder

      public JcePBMac1CalculatorBuilder(String macAlgorithm, int keySize, MacAlgorithmIdentifierFinder algIdFinder)
      Base constructor - MAC name and key size with a custom AlgorithmIdentifier finder for the MAC algorithm.
      Parameters:
      macAlgorithm - name of the MAC algorithm.
      keySize - the key size in bits.
      algIdFinder - an AlgorithmIdentifier finder containing the specified MAC name.
    • JcePBMac1CalculatorBuilder

      public JcePBMac1CalculatorBuilder(org.bouncycastle.asn1.pkcs.PBMAC1Params pbeMacParams)
      Base constructor from an ASN.1 parameter set. See RFC 8108 for details.
      Parameters:
      pbeMacParams - the ASN.1 parameters for the MAC calculator we want to create.
  • Method Details