BaseMac (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.jcajce.provider.symmetric.util

## Class BaseMac

- java.lang.Object
- - javax.crypto.MacSpi
  - - org.bouncycastle.jcajce.provider.symmetric.util.BaseMac

- All Implemented Interfaces:
    PBE
  Direct Known Subclasses:
    AES.AESCMAC, AES.AESGMAC, AES.Poly1305, Camellia.GMAC, Camellia.Poly1305, CAST6.GMAC, CAST6.Poly1305, DES.CBCMAC, DES.CMAC, DES.DES64, DES.DES64with7816d4, DES.DES9797Alg3, DES.DES9797Alg3with7816d4, DES.DESCFB8, DESede.CBCMAC, DESede.CMAC, DESede.DESede64, DESede.DESede64with7816d4, DESede.DESedeCFB8, GOST28147.Mac, GOST3411.HashMac, IDEA.CFB8Mac, IDEA.Mac, MD2.HashMac, MD4.HashMac, MD5.HashMac, Noekeon.GMAC, Noekeon.Poly1305, RC2.CBCMAC, RC2.CFB8MAC, RC5.CFB8Mac32, RC5.Mac32, RC6.GMAC, RC6.Poly1305, RIPEMD128.HashMac, RIPEMD160.HashMac, RIPEMD160.PBEWithHmac, RIPEMD256.HashMac, RIPEMD320.HashMac, SEED.GMAC, SEED.Poly1305, Serpent.Poly1305, Serpent.SerpentGMAC, SHA1.HashMac, SHA1.SHA1Mac, SHA224.HashMac, SHA256.HashMac, SHA3.HashMac224, SHA3.HashMac256, SHA3.HashMac384, SHA3.HashMac512, SHA384.HashMac, SHA384.OldSHA384, SHA512.HashMac, SHA512.HashMacT224, SHA512.HashMacT256, SHA512.OldSHA512, SipHash.Mac24, SipHash.Mac48, Skein.HashMac_1024_1024, Skein.HashMac_1024_384, Skein.HashMac_1024_512, Skein.HashMac_256_128, Skein.HashMac_256_160, Skein.HashMac_256_224, Skein.HashMac_256_256, Skein.HashMac_512_128, Skein.HashMac_512_160, Skein.HashMac_512_224, Skein.HashMac_512_256, Skein.HashMac_512_384, Skein.HashMac_512_512, Skein.SkeinMac_1024_1024, Skein.SkeinMac_1024_384, Skein.SkeinMac_1024_512, Skein.SkeinMac_256_128, Skein.SkeinMac_256_160, Skein.SkeinMac_256_224, Skein.SkeinMac_256_256, Skein.SkeinMac_512_128, Skein.SkeinMac_512_160, Skein.SkeinMac_512_224, Skein.SkeinMac_512_256, Skein.SkeinMac_512_384, Skein.SkeinMac_512_512, Skipjack.Mac, Skipjack.MacCFB8, Tiger.HashMac, Tiger.PBEWithHashMac, Tiger.TigerHmac, Twofish.GMAC, Twofish.Poly1305, VMPC.Mac, Whirlpool.HashMac

      public class BaseMac
      extends javax.crypto.MacSpi
      implements PBE

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.bouncycastle.jcajce.provider.symmetric.util.PBE

      `PBE.Util`

  - ### Field Summary

    - ### Fields inherited from interface org.bouncycastle.jcajce.provider.symmetric.util.PBE

      `GOST3411, MD2, MD5, OPENSSL, PKCS12, PKCS5S1, PKCS5S1_UTF8, PKCS5S2, PKCS5S2_UTF8, RIPEMD160, SHA1, SHA256, TIGER`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BaseMac(Mac macEngine)`
    `protected` | `BaseMac(Mac macEngine, int pbeType, int pbeHash, int keySize)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected byte[]` | `engineDoFinal()`
    `protected int` | `engineGetMacLength()`
    `protected void` | `engineInit(java.security.Key key, java.security.spec.AlgorithmParameterSpec params)`
    `protected void` | `engineReset()`
    `protected void` | `engineUpdate(byte input)`
    `protected void` | `engineUpdate(byte[] input, int offset, int len)`

    - ### Methods inherited from class javax.crypto.MacSpi

      `clone, engineUpdate`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BaseMac

          protected BaseMac(Mac macEngine)

    - #### BaseMac

          protected BaseMac(Mac macEngine,
                 int pbeType,
                 int pbeHash,
                 int keySize)

  - ### Method Detail

    - #### engineInit

          protected void engineInit(java.security.Key key,
                        java.security.spec.AlgorithmParameterSpec params)
                             throws java.security.InvalidKeyException,
                                    java.security.InvalidAlgorithmParameterException

      Specified by:
        `engineInit` in class `javax.crypto.MacSpi`
      Throws:
        `java.security.InvalidKeyException`
        `java.security.InvalidAlgorithmParameterException`

    - #### engineGetMacLength

          protected int engineGetMacLength()

      Specified by:
        `engineGetMacLength` in class `javax.crypto.MacSpi`

    - #### engineReset

          protected void engineReset()

      Specified by:
        `engineReset` in class `javax.crypto.MacSpi`

    - #### engineUpdate

          protected void engineUpdate(byte input)

      Specified by:
        `engineUpdate` in class `javax.crypto.MacSpi`

    - #### engineUpdate

          protected void engineUpdate(byte[] input,
                          int offset,
                          int len)

      Specified by:
        `engineUpdate` in class `javax.crypto.MacSpi`

    - #### engineDoFinal

          protected byte[] engineDoFinal()

      Specified by:
        `engineDoFinal` in class `javax.crypto.MacSpi`