Class MD4


  • public class MD4
    extends java.security.MessageDigest
    MD4.java - An implementation of Ron Rivest's MD4 message digest algorithm. The MD4 algorithm is designed to be quite fast on 32-bit machines. In addition, the MD4 algorithm does not require any large substitution tables.
    Since:
    MINA 2.0.0-M3
    See Also:
    MD4 Message- Digest Algorithm by R. Rivest.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BYTE_BLOCK_LENGTH
      The MD4 algorithm block length is 64 bytes wide.
      static int BYTE_DIGEST_LENGTH
      The MD4 algorithm message digest length is 16 bytes wide.
    • Constructor Summary

      Constructors 
      Constructor Description
      MD4()
      Default constructor.
    • Method Summary

      Modifier and Type Method Description
      protected byte[] engineDigest()
      protected int engineDigest​(byte[] buf, int offset, int len)
      protected int engineGetDigestLength()
      Returns the digest length in bytes.
      protected void engineReset()
      protected void engineUpdate​(byte b)
      protected void engineUpdate​(byte[] b, int offset, int len)
      • Methods inherited from class java.security.MessageDigest

        clone, digest, digest, digest, getAlgorithm, getDigestLength, getInstance, getInstance, getInstance, getProvider, isEqual, reset, toString, update, update, update, update
      • Methods inherited from class java.security.MessageDigestSpi

        engineUpdate
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • BYTE_DIGEST_LENGTH

        public static final int BYTE_DIGEST_LENGTH
        The MD4 algorithm message digest length is 16 bytes wide.
        See Also:
        Constant Field Values
      • BYTE_BLOCK_LENGTH

        public static final int BYTE_BLOCK_LENGTH
        The MD4 algorithm block length is 64 bytes wide.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MD4

        public MD4()
        Default constructor.
    • Method Detail

      • engineGetDigestLength

        protected int engineGetDigestLength()
        Returns the digest length in bytes.
        Overrides:
        engineGetDigestLength in class java.security.MessageDigestSpi
        Returns:
        the digest length in bytes.
      • engineUpdate

        protected void engineUpdate​(byte b)
        Specified by:
        engineUpdate in class java.security.MessageDigestSpi
      • engineUpdate

        protected void engineUpdate​(byte[] b,
                                    int offset,
                                    int len)
        Specified by:
        engineUpdate in class java.security.MessageDigestSpi
      • engineDigest

        protected byte[] engineDigest()
        Specified by:
        engineDigest in class java.security.MessageDigestSpi
      • engineDigest

        protected int engineDigest​(byte[] buf,
                                   int offset,
                                   int len)
                            throws java.security.DigestException
        Overrides:
        engineDigest in class java.security.MessageDigestSpi
        Throws:
        java.security.DigestException
      • engineReset

        protected void engineReset()
        Specified by:
        engineReset in class java.security.MessageDigestSpi