Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org> Imported GNU Classpath 0.92 * HACKING: Add more importing hints. Update automake version requirement. * configure.ac (gconf-peer): New enable AC argument. Add --disable-gconf-peer and --enable-default-preferences-peer to classpath configure when gconf is disabled. * scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and gnu/java/awt/dnd/peer/gtk to bc. Classify gnu/java/security/Configuration.java as generated source file. * gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java, gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java, gnu/java/lang/management/VMClassLoadingMXBeanImpl.java, gnu/java/lang/management/VMRuntimeMXBeanImpl.java, gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java, gnu/java/lang/management/VMThreadMXBeanImpl.java, gnu/java/lang/management/VMMemoryMXBeanImpl.java, gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub classes. * java/lang/management/VMManagementFactory.java: Likewise. * java/net/VMURLConnection.java: Likewise. * gnu/java/nio/VMChannel.java: Likewise. * java/lang/Thread.java (getState): Add stub implementation. * java/lang/Class.java (isEnum): Likewise. * java/lang/Class.h (isEnum): Likewise. * gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed. * javax/naming/spi/NamingManager.java: New override for StackWalker functionality. * configure, sources.am, Makefile.in, gcj/Makefile.in, include/Makefile.in, testsuite/Makefile.in: Regenerated. From-SVN: r116139
This commit is contained in:
parent
abab460491
commit
ac1ed908de
1294 changed files with 99479 additions and 35933 deletions
|
@ -40,35 +40,26 @@ package gnu.javax.crypto.mac;
|
|||
|
||||
import gnu.java.security.hash.IMessageDigest;
|
||||
|
||||
import java.util.Map;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>A base abstract class to facilitate <i>MAC</i> (Message Authentication
|
||||
* Code) implementations.</p>
|
||||
* A base abstract class to facilitate <i>MAC</i> (Message Authentication Code)
|
||||
* implementations.
|
||||
*/
|
||||
public abstract class BaseMac implements IMac
|
||||
public abstract class BaseMac
|
||||
implements IMac
|
||||
{
|
||||
|
||||
// Constants and variables
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/** The canonical name prefix of the <i>MAC</i>. */
|
||||
protected String name;
|
||||
|
||||
/** Reference to the underlying hash algorithm instance. */
|
||||
protected IMessageDigest underlyingHash;
|
||||
|
||||
/** The length of the truncated output in bytes. */
|
||||
protected int truncatedSize;
|
||||
|
||||
/** The authentication key for this instance. */
|
||||
// protected transient byte[] K;
|
||||
// Constructor(s)
|
||||
// -------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Trivial constructor for use by concrete subclasses.</p>
|
||||
*
|
||||
* Trivial constructor for use by concrete subclasses.
|
||||
*
|
||||
* @param name the canonical name of this instance.
|
||||
*/
|
||||
protected BaseMac(String name)
|
||||
|
@ -79,8 +70,8 @@ public abstract class BaseMac implements IMac
|
|||
}
|
||||
|
||||
/**
|
||||
* <p>Trivial constructor for use by concrete subclasses.</p>
|
||||
*
|
||||
* Trivial constructor for use by concrete subclasses.
|
||||
*
|
||||
* @param name the canonical name of this instance.
|
||||
* @param underlyingHash the underlying message digest algorithm instance.
|
||||
*/
|
||||
|
@ -89,20 +80,10 @@ public abstract class BaseMac implements IMac
|
|||
this(name);
|
||||
|
||||
if (underlyingHash != null)
|
||||
{
|
||||
truncatedSize = underlyingHash.hashSize();
|
||||
}
|
||||
truncatedSize = underlyingHash.hashSize();
|
||||
this.underlyingHash = underlyingHash;
|
||||
}
|
||||
|
||||
// Class methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
// Instance methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
// gnu.crypto.mac.IMac interface implementation ----------------------------
|
||||
|
||||
public String name()
|
||||
{
|
||||
return name;
|
||||
|
@ -137,12 +118,10 @@ public abstract class BaseMac implements IMac
|
|||
return result;
|
||||
}
|
||||
|
||||
// methods to be implemented by concrete subclasses ------------------------
|
||||
|
||||
public abstract void init(Map attributes) throws InvalidKeyException,
|
||||
IllegalStateException;
|
||||
|
||||
public abstract byte[] digest();
|
||||
|
||||
public abstract boolean selfTest();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue