com.ibm.crypto.ibmjcehybrid.provider

Class PBMHybrid

  • java.lang.Object
    • javax.crypto.MacSpi
      • com.ibm.crypto.ibmjcehybrid.provider.PBMHybrid
  • All Implemented Interfaces:
    java.lang.Cloneable


    public final class PBMHybrid
    extends javax.crypto.MacSpi
    This class is a facade for the Password Based Mac algorithm.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PBMHybrid()
      Creates an instance of the PBMHybrid class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone() 
      protected byte[] engineDoFinal()
      Completes the HMAC computation and resets the HMAC for further use, maintaining the secret key that the HMAC was initialized with.
      protected int engineGetMacLength()
      Returns the length of the HMAC in bytes.
      protected void engineInit(java.security.Key key, java.security.spec.AlgorithmParameterSpec params)
      Initializes this mac with a key and a set of algorithm parameters.
      protected void engineReset()
      Resets the HMAC for further use, maintaining the secret key that the HMAC 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.
      • Methods inherited from class javax.crypto.MacSpi

        engineUpdate
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PBMHybrid

        public PBMHybrid()
        Creates an instance of the PBMHybrid class.
    • Method Detail

      • engineGetMacLength

        protected int engineGetMacLength()
        Returns the length of the HMAC in bytes.
        Specified by:
        engineGetMacLength in class javax.crypto.MacSpi
        Returns:
        the HMAC length in bytes.
      • engineInit

        protected void engineInit(java.security.Key key,
                                  java.security.spec.AlgorithmParameterSpec params)
                           throws java.security.InvalidKeyException,
                                  java.security.InvalidAlgorithmParameterException
        Initializes this mac with a key and a set of algorithm parameters.
        Specified by:
        engineInit in class javax.crypto.MacSpi
        Parameters:
        key - the encryption 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
      • engineUpdate

        protected void engineUpdate(byte input)
        Processes the given byte.
        Specified by:
        engineUpdate in class javax.crypto.MacSpi
        Parameters:
        input - the input byte to be processed.
      • engineUpdate

        protected void engineUpdate(byte[] input,
                                    int offset,
                                    int len)
        Processes the first len bytes in input, starting at offset.
        Specified by:
        engineUpdate in 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()
        Completes the HMAC computation and resets the HMAC for further use, maintaining the secret key that the HMAC was initialized with.
        Specified by:
        engineDoFinal in class javax.crypto.MacSpi
        Returns:
        the HMAC result.
      • engineReset

        protected void engineReset()
        Resets the HMAC for further use, maintaining the secret key that the HMAC was initialized with.
        Specified by:
        engineReset in class javax.crypto.MacSpi
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class javax.crypto.MacSpi
� Portions Copyright 1997, 2016 IBM Corporation. All rights reserved. � Portions Copyright 1997, 2016, Oracle and/or its affiliates. All rights reserved.