Bouncy Castle Cryptography 1.11 API Specification: Class JCEMac
Bouncy Castle Cryptography 1.11

org.bouncycastle.jce.provider
Class JCEMac

java.lang.Object
  |
  +--javax.crypto.MacSpi
        |
        +--org.bouncycastle.jce.provider.JCEMac
All Implemented Interfaces:
PBE
Direct Known Subclasses:
JCEMac.DES, JCEMac.DESCFB8, JCEMac.DESede, JCEMac.DESedeCFB8, JCEMac.IDEA, JCEMac.IDEACFB8, JCEMac.MD2, JCEMac.MD4, JCEMac.MD5, JCEMac.PBEWithRIPEMD160, JCEMac.PBEWithSHA, JCEMac.PBEWithTiger, JCEMac.RC2, JCEMac.RC2CFB8, JCEMac.RC5, JCEMac.RC5CFB8, JCEMac.RIPEMD128, JCEMac.RIPEMD160, JCEMac.SHA1, JCEMac.Skipjack, JCEMac.SkipjackCFB8, JCEMac.Tiger

public class JCEMac
extends MacSpi
implements PBE


Inner Class Summary
static class JCEMac.DES
          DES
static class JCEMac.DESCFB8
          DES
static class JCEMac.DESede
          DESede
static class JCEMac.DESedeCFB8
          DESede
static class JCEMac.IDEA
          IDEA
static class JCEMac.IDEACFB8
          IDEACFB8
static class JCEMac.MD2
          MD2 HMac
static class JCEMac.MD4
          MD4 HMac
static class JCEMac.MD5
          MD5 HMac
static class JCEMac.PBEWithRIPEMD160
          PBEWithHmacRIPEMD160
static class JCEMac.PBEWithSHA
          PBEWithHmacSHA
static class JCEMac.PBEWithTiger
          PBEWithHmacTiger
static class JCEMac.RC2
          RC2
static class JCEMac.RC2CFB8
          RC2CFB8
static class JCEMac.RC5
          RC5
static class JCEMac.RC5CFB8
          RC5CFB8
static class JCEMac.RIPEMD128
          RIPEMD128 HMac
static class JCEMac.RIPEMD160
          RIPEMD160 HMac
static class JCEMac.SHA1
          SHA1 HMac
static class JCEMac.Skipjack
          SKIPJACK
static class JCEMac.SkipjackCFB8
          SKIPJACK
static class JCEMac.Tiger
          Tiger HMac
 
Inner classes inherited from class org.bouncycastle.jce.provider.PBE
PBE.Util
 
Fields inherited from interface org.bouncycastle.jce.provider.PBE
MD5, PKCS12, PKCS5S1, PKCS5S2, RIPEMD160, SHA1, TIGER
 
Constructor Summary
protected JCEMac(Mac macEngine)
           
protected JCEMac(Mac macEngine, int pbeType, int pbeHash, int keySize)
           
 
Method Summary
protected  byte[] engineDoFinal()
          Completes the MAC computation and resets the MAC for further use, maintaining the secret key that the MAC was initialized with.
protected  int engineGetMacLength()
          Returns the length of the MAC in bytes.
protected  void engineInit(java.security.Key key, java.security.spec.AlgorithmParameterSpec params)
          Initializes the MAC with the given (secret) key and algorithm parameters.
protected  void engineReset()
          Resets the MAC for further use, maintaining the secret key that the MAC was initialized with.
protected  void engineUpdate(byte input)
          Processes the given byte.
protected  void engineUpdate(byte[] input, int offset, int len)
          Processes the first len bytes in input, starting at offset inclusive.
 
Methods inherited from class javax.crypto.MacSpi
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCEMac

protected JCEMac(Mac macEngine)

JCEMac

protected JCEMac(Mac macEngine,
                 int pbeType,
                 int pbeHash,
                 int keySize)
Method Detail

engineInit

protected void engineInit(java.security.Key key,
                          java.security.spec.AlgorithmParameterSpec params)
Description copied from class: MacSpi
Initializes the MAC with the given (secret) key and algorithm parameters.
Overrides:
engineInit in class MacSpi
Following copied from class: javax.crypto.MacSpi
Parameters:
key - - the (secret) key.
params - - the algorithm parameters.
Throws:
java.security.InvalidKeyException - if the given key is inappropriate for initializing this MAC.
java.security.InvalidAlgorithmParameterException - - if the given algorithm parameters are inappropriate for this MAC.

engineGetMacLength

protected int engineGetMacLength()
Description copied from class: MacSpi
Returns the length of the MAC in bytes.
Overrides:
engineGetMacLength in class MacSpi
Following copied from class: javax.crypto.MacSpi
Returns:
the MAC length in bytes.

engineReset

protected void engineReset()
Description copied from class: MacSpi
Resets the MAC for further use, maintaining the secret key that the MAC was initialized with.
Overrides:
engineReset in class MacSpi

engineUpdate

protected void engineUpdate(byte input)
Description copied from class: MacSpi
Processes the given byte.
Overrides:
engineUpdate in class MacSpi
Following copied from class: javax.crypto.MacSpi
Parameters:
input - - the input byte to be processed.

engineUpdate

protected void engineUpdate(byte[] input,
                            int offset,
                            int len)
Description copied from class: MacSpi
Processes the first len bytes in input, starting at offset inclusive.
Overrides:
engineUpdate in class MacSpi
Following copied from class: javax.crypto.MacSpi
Parameters:
input - the input buffer.
offset - the offset in input where the input starts.
len - the number of bytes to process.

engineDoFinal

protected byte[] engineDoFinal()
Description copied from class: MacSpi
Completes the MAC computation and resets the MAC for further use, maintaining the secret key that the MAC was initialized with.
Overrides:
engineDoFinal in class MacSpi
Following copied from class: javax.crypto.MacSpi
Returns:
the MAC result.

Bouncy Castle Cryptography 1.11