Bouncy Castle Cryptography Library 1.85

org.bouncycastle.jcajce.spec
Class KMACParameterSpec

java.lang.Object
  extended byorg.bouncycastle.jcajce.spec.KMACParameterSpec
All Implemented Interfaces:
java.security.spec.AlgorithmParameterSpec

public class KMACParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec

ParameterSpec for the KMAC variants of SHAKE as used by CMS (RFC 8702 §3.4). Carries the MAC output length and the customization string that are encoded in the SEQUENCE.


Constructor Summary
KMACParameterSpec(int macSizeInBits)
          Base constructor with empty customization string.
KMACParameterSpec(int macSizeInBits, byte[] customizationString)
          Base constructor.
 
Method Summary
 byte[] getCustomizationString()
           
 int getMacSizeInBits()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KMACParameterSpec

public KMACParameterSpec(int macSizeInBits)
Base constructor with empty customization string.

Parameters:
macSizeInBits - the requested MAC output length in bits; must be a multiple of 8.

KMACParameterSpec

public KMACParameterSpec(int macSizeInBits,
                         byte[] customizationString)
Base constructor.

Parameters:
macSizeInBits - the requested MAC output length in bits; must be a multiple of 8.
customizationString - the customization string passed to KMAC; may be empty.
Method Detail

getMacSizeInBits

public int getMacSizeInBits()

getCustomizationString

public byte[] getCustomizationString()

Bouncy Castle Cryptography Library 1.85