Class Mac


  • public class Mac
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] doFinal()  
      byte[] doFinal​(byte[] last)  
      byte[] doFinal​(byte[] last, int offset, int len)  
      static Mac getInstance​(java.lang.String algoName)  
      void init​(javax.crypto.spec.SecretKeySpec key)  
      void update​(byte[] input)  
      void update​(byte[] input, int offset, int len)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static Mac getInstance​(java.lang.String algoName)
                               throws java.security.NoSuchAlgorithmException
        Throws:
        java.security.NoSuchAlgorithmException
      • init

        public void init​(javax.crypto.spec.SecretKeySpec key)
                  throws java.security.InvalidKeyException,
                         java.lang.IllegalStateException
        Throws:
        java.security.InvalidKeyException
        java.lang.IllegalStateException
      • update

        public void update​(byte[] input,
                           int offset,
                           int len)
                    throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • update

        public void update​(byte[] input)
                    throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • doFinal

        public byte[] doFinal()
                       throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • doFinal

        public byte[] doFinal​(byte[] last)
                       throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException
      • doFinal

        public byte[] doFinal​(byte[] last,
                              int offset,
                              int len)
                       throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException