Package org.bouncycastle.crypto.fips
Class FipsAES.AuthParameters
java.lang.Object
org.bouncycastle.crypto.fips.FipsParameters
org.bouncycastle.crypto.fips.FipsAES.AuthParameters
- All Implemented Interfaces:
AuthenticationParameters,AuthenticationParametersWithIV,Parameters,ParametersWithIV
- Enclosing class:
FipsAES
public static final class FipsAES.AuthParameters
extends FipsParameters
implements AuthenticationParametersWithIV
Parameters for AES AEAD and MAC modes..
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]getIV()Return the initialization vector associated with this parameter set.intReturn the size of the MAC these parameters are for.withIV(byte[] iv) Create a new parameter set with a different IV.withIV(SecureRandom random) Create a new parameter set with a different IV based on the output of the passed in random.withIV(SecureRandom random, int ivLen) Return an implementation of our parameterized type with an IV constructed from the passed in SecureRandom.withMACSize(int macSizeInBits) Return a new set of parameters specifying a specific mac size.Methods inherited from class org.bouncycastle.crypto.fips.FipsParameters
getAlgorithmMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bouncycastle.crypto.Parameters
getAlgorithm
-
Method Details
-
getMACSizeInBits
public int getMACSizeInBits()Description copied from interface:AuthenticationParametersReturn the size of the MAC these parameters are for.- Specified by:
getMACSizeInBitsin interfaceAuthenticationParameters- Returns:
- the MAC size in bits.
-
getIV
public byte[] getIV()Description copied from interface:ParametersWithIVReturn the initialization vector associated with this parameter set.- Specified by:
getIVin interfaceParametersWithIV- Returns:
- the IV for these parameters.
-
withIV
Description copied from interface:ParametersWithIVCreate a new parameter set with a different IV.- Specified by:
withIVin interfaceParametersWithIV- Parameters:
iv- the IV to use.- Returns:
- a copy of the current parameter set with the new IV.
-
withIV
Description copied from interface:ParametersWithIVCreate a new parameter set with a different IV based on the output of the passed in random.- Specified by:
withIVin 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
Description copied from interface:AuthenticationParametersWithIVReturn an implementation of our parameterized type with an IV constructed from the passed in SecureRandom.- Specified by:
withIVin interfaceAuthenticationParametersWithIV- Parameters:
random- source of randomness for iv (nonce)ivLen- length of the iv (nonce) in bytes to use with the algorithm.
-
withMACSize
Return a new set of parameters specifying a specific mac size.- Specified by:
withMACSizein interfaceAuthenticationParameters- Parameters:
macSizeInBits- bit length of the MAC length.- Returns:
- a new set of AuthParameters for the MAC size.
-