Package com.nimbusds.jose.crypto.impl
Class PRFParams
- java.lang.Object
-
- com.nimbusds.jose.crypto.impl.PRFParams
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDerivedKeyByteLength()
Returns the byte length of the key to derive.String
getMACAlgorithm()
Returns the JCA MAC algorithm name.Provider
getMacProvider()
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 Detail
-
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 benull
.macProvider
- The JCA MAC provider,null
to use the default one.dkLen
- The byte length of the key to derive.
-
-
Method Detail
-
getMACAlgorithm
public String getMACAlgorithm()
Returns the JCA MAC algorithm name.- Returns:
- The JCA MAC algorithm name.
-
getMacProvider
public Provider getMacProvider()
Returns the JCA MAC provider.- Returns:
- The JCA MAC provider,
null
to use the default one.
-
getDerivedKeyByteLength
public int 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 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.
-
-