Class MacTest


  • public class MacTest
    extends java.lang.Object
    To generate hmac with an hex key : - Use this site : https://cryptii.com/pipes/hmac - Or following openssl command : echo -n "Hi There" | openssl dgst -sha256 -mac HMAC -macopt hexkey:0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
    • Constructor Summary

      Constructors 
      Constructor Description
      MacTest()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void testHmacMD5()
      Test HmacMD5 algorithm with various messages and key sizes
      void testHmacSHA1()
      Test HmacSHA1 algorithm with various messages and key sizes
      void testHmacSHA256()
      Test HmacSHA256algorithm with various messages and key sizes
      • Methods inherited from class java.lang.Object

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

      • MacTest

        public MacTest()
    • Method Detail

      • testHmacSHA256

        public void testHmacSHA256()
                            throws java.lang.Exception
        Test HmacSHA256algorithm with various messages and key sizes
        Throws:
        java.lang.Exception
      • testHmacSHA1

        public void testHmacSHA1()
                          throws java.lang.Exception
        Test HmacSHA1 algorithm with various messages and key sizes
        Throws:
        java.lang.Exception
      • testHmacMD5

        public void testHmacMD5()
                         throws java.lang.Exception
        Test HmacMD5 algorithm with various messages and key sizes
        Throws:
        java.lang.Exception