01: /* Id: MessageDigestSpi.java,v 1.5 2000/02/09 20:28:13 gelderen Exp
02: *
03: * Copyright (C) 1995-1999 The Cryptix Foundation Limited.
04: * All rights reserved.
05: *
06: * Use, modification, copying and distribution of this software is subject
07: * the terms and conditions of the Cryptix General Licence. You should have
08: * received a copy of the Cryptix General Licence along with this library;
09: * if not, you can download a copy from http://www.cryptix.org/ .
10: */
11: package uk.org.ponder.hashutil;
12:
13: import java.security.MessageDigest;
14:
15: /**
16: * JDK 1.1 compatibility layer: our hashes derive from the MessageDigestSpi
17: * class which is not present in JDK 1.1.
18: *
19: * In JDK 1.2, MessageDigest extends MessageDigestSpi but in JDK 1.1,
20: * MessageDigestSpi extends MessageDigest. This is transparent, except
21: * for the fact that the 1.1 MessageDigest constructor needs a String
22: * representing the algorithm name.
23: *
24: * For now we simply set the empty string (""). Should this become a
25: * problem,we can revert to 'compatibility mode' and derive our hashes
26: * from MessageDigest instead of from MessageDigestSpi.
27: *
28: * @version Revision: 1.5
29: * @author Jeroen C. van Gelderen (gelderen@cryptix.org)
30: */
31: public abstract class MessageDigestSpi extends MessageDigest {
32: public MessageDigestSpi() {
33: super (""); // empty string (see above)
34: }
35: }
|