Class PRFParams

java.lang.Object
com.nimbusds.jose.crypto.impl.PRFParams

@Immutable public final class PRFParams extends Object
Pseudo-Random Function (PRF) parameters, intended for use in the Password- Based Key Derivation Function 2 (PBKDF2).
Version:
2024-09-10
Author:
Vladimir Dzhuvinov
  • Constructor Details

    • PRFParams

      public PRFParams(String jcaMacAlg, Provider macProvider, int dkLen)
      Creates a new pseudo-random function parameters instance.
      Parameters:
      jcaMacAlg - The JCA MAC algorithm name. Must not be null.
      macProvider - The JCA MAC provider, null to use the default one.
      dkLen - The byte length of the key to derive.
  • Method Details

    • getMACAlgorithm

      Returns the JCA MAC algorithm name.
      Returns:
      The JCA MAC algorithm name.
    • getMacProvider

      Returns the JCA MAC provider.
      Returns:
      The JCA MAC provider, null to use the default one.
    • getDerivedKeyByteLength

      Returns the byte length of the key to derive.
      Returns:
      The byte length of the key to derive.
    • resolve

      public static PRFParams resolve(JWEAlgorithm alg, Provider macProvider) throws JOSEException
      Resolves the Pseudo-Random Function (PRF) parameters for the specified PBES2 JWE algorithm.
      Parameters:
      alg - The JWE algorithm. Must be supported and not null.
      macProvider - The specific MAC JCA provider, null to use the default one.
      Returns:
      The PRF parameters.
      Throws:
      JOSEException - If the JWE algorithm is not supported.