Class MessageDigestTest


  • public class MessageDigestTest
    extends java.lang.Object
    Tests the MessageDigest supported algorithms.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void testDigestAtNonZeroOffsets()
      A digest computed from a sub-range and written at an offset lands where it was asked to, is the published value, and leaves the rest of the output alone, for each algorithm.
      void testMD5()
      Tests MD5 algorithm with different data sizes.
      void testSHA1()
      Tests SHA-1 algorithm with different data sizes.
      void testSHA256()
      Tests SHA-256 algorithm with different data sizes.
      void testSHA512()
      Tests SHA-512 algorithm with different data sizes.
      • Methods inherited from class java.lang.Object

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

      • MessageDigestTest

        public MessageDigestTest()
    • Method Detail

      • testMD5

        public void testMD5()
                     throws java.lang.Exception
        Tests MD5 algorithm with different data sizes.
        Throws:
        java.lang.Exception - If a test has gone wrong.
      • testSHA1

        public void testSHA1()
                      throws java.lang.Exception
        Tests SHA-1 algorithm with different data sizes.
        Throws:
        java.lang.Exception - If a test has gone wrong.
      • testSHA256

        public void testSHA256()
                        throws java.lang.Exception
        Tests SHA-256 algorithm with different data sizes.
        Throws:
        java.lang.Exception - If a test has gone wrong.
      • testSHA512

        public void testSHA512()
                        throws java.lang.Exception
        Tests SHA-512 algorithm with different data sizes.
        Throws:
        java.lang.Exception - If a test has gone wrong.
      • testDigestAtNonZeroOffsets

        public void testDigestAtNonZeroOffsets()
                                        throws java.lang.Exception
        A digest computed from a sub-range and written at an offset lands where it was asked to, is the published value, and leaves the rest of the output alone, for each algorithm.
        Throws:
        java.lang.Exception