Package com.nimbusds.jose.crypto.impl
Class PRFParams
java.lang.Object
com.nimbusds.jose.crypto.impl.PRFParams
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the byte length of the key to derive.Returns the JCA MAC algorithm name.Returns the JCA MAC provider.static PRFParams
resolve
(JWEAlgorithm alg, Provider macProvider) Resolves the Pseudo-Random Function (PRF) parameters for the specified PBES2 JWE algorithm.
-
Constructor Details
-
PRFParams
Creates a new pseudo-random function parameters instance.- Parameters:
jcaMacAlg
- The JCA MAC algorithm name. Must not benull
.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
Resolves the Pseudo-Random Function (PRF) parameters for the specified PBES2 JWE algorithm.- Parameters:
alg
- The JWE algorithm. Must be supported and notnull
.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.
-