Package org.bouncycastle.crypto.fips
Class FipsTripleDES.AuthParameters
- java.lang.Object
-
- org.bouncycastle.crypto.fips.FipsParameters
-
- org.bouncycastle.crypto.fips.FipsTripleDES.AuthParameters
-
- All Implemented Interfaces:
AuthenticationParameters
,AuthenticationParametersWithIV
,Parameters
,ParametersWithIV
- Enclosing class:
- FipsTripleDES
public static final class FipsTripleDES.AuthParameters extends FipsParameters implements AuthenticationParametersWithIV
Parameters for Triple-DES AEAD and MAC modes..
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getIV()
Return the initialization vector associated with this parameter set.int
getMACSizeInBits()
Return the size of the MAC these parameters are for.FipsTripleDES.AuthParameters
withIV(byte[] iv)
Create a new parameter set with a different IV.FipsTripleDES.AuthParameters
withIV(java.security.SecureRandom random)
Create a new parameter set with a different IV based on the output of the passed in random.FipsTripleDES.AuthParameters
withIV(java.security.SecureRandom random, int ivLen)
Return an implementation of our parameterized type with an IV constructed from the passed in SecureRandom.FipsTripleDES.AuthParameters
withMACSize(int macSizeInBits)
Create a parameter set with the specified MAC size associated with it.-
Methods inherited from class org.bouncycastle.crypto.fips.FipsParameters
getAlgorithm
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bouncycastle.crypto.Parameters
getAlgorithm
-
-
-
-
Method Detail
-
getMACSizeInBits
public int getMACSizeInBits()
Description copied from interface:AuthenticationParameters
Return the size of the MAC these parameters are for.- Specified by:
getMACSizeInBits
in interfaceAuthenticationParameters
- Returns:
- the MAC size in bits.
-
getIV
public byte[] getIV()
Description copied from interface:ParametersWithIV
Return the initialization vector associated with this parameter set.- Specified by:
getIV
in interfaceParametersWithIV
- Returns:
- the IV for these parameters.
-
withIV
public FipsTripleDES.AuthParameters withIV(byte[] iv)
Description copied from interface:ParametersWithIV
Create a new parameter set with a different IV.- Specified by:
withIV
in interfaceParametersWithIV
- Parameters:
iv
- the IV to use.- Returns:
- a copy of the current parameter set with the new IV.
-
withIV
public FipsTripleDES.AuthParameters withIV(java.security.SecureRandom random)
Description copied from interface:ParametersWithIV
Create a new parameter set with a different IV based on the output of the passed in random.- Specified by:
withIV
in interfaceParametersWithIV
- Parameters:
random
- the SecureRandom to use as the source of IV data.- Returns:
- a copy of the current parameter set with the new IV.
-
withIV
public FipsTripleDES.AuthParameters withIV(java.security.SecureRandom random, int ivLen)
Description copied from interface:AuthenticationParametersWithIV
Return an implementation of our parameterized type with an IV constructed from the passed in SecureRandom.- Specified by:
withIV
in interfaceAuthenticationParametersWithIV
- Parameters:
random
- source of randomness for iv (nonce)ivLen
- length of the iv (nonce) in bytes to use with the algorithm.
-
withMACSize
public FipsTripleDES.AuthParameters withMACSize(int macSizeInBits)
Description copied from interface:AuthenticationParameters
Create a parameter set with the specified MAC size associated with it.- Specified by:
withMACSize
in interfaceAuthenticationParameters
- Parameters:
macSizeInBits
- bit length of the MAC length.- Returns:
- the new parameter set.
-
-