recoverable md5
This library is a rewrite of the fast-md5 implementation in java. The goal of this library is to make the MD5 state recoverable for cases where the programmer does not want to recalculate an MD5 for partial hashes of files or streams. It is not meant to be fast and does not use the native code, although, it would be easy for a programmer to implement the native code.
Fast implementation of RSA's MD5 hash generator in Java JDK Beta-2 or higher.
Originally written by Santeri Paavolainen, Helsinki Finland 1996.
(c) Santeri Paavolainen, Helsinki Finland 1996
Many changes Copyright (c) 2002 - 2010 Timothy W Macinta
Updates to use MessageDigest abstraction and to allow the internal state to be recoverable 2011 John Mercier
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
MD5MessageDigest is not made to be fast and therefore does not use the native libraries. It does, however, use the original non-native implementation of fast-md5, so it should be fairly fast. The idea behind this Digest is to allow users to stop a Digest, save the state, and restart the Digest from the same point it was stopped. The key is to use getState(), save the state and later pass that state in a MD5MessageDigest constructor to reuse it.
Another goal that was in the original implementation is to allow a Digest have a running display of the current updates. To do this use digest() and get the hash string from the MD5State. The hash string will not be current unless digest is called first.
Future developers are welcome to submit ideas, errors, or requests to "It is my hope that this library will be useful to programmers calculating md5s for input from ranged/recoverable protocols such as http and ftp." - John Mercier
@author Santeri Paavolainen
@author Timothy W Macinta (twm@alum.mit.edu) (optimizations and bug fixes)
@author John Mercier