From ffde862e033a0825e1e9972a89c0f1f80b261a8e Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 14 Aug 2006 23:12:35 +0000 Subject: 2006-08-14 Mark Wielaard 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116139 138bc75d-0d04-0410-961f-82ee72b054a4 --- .../gnu/java/security/sig/ISignature.java | 111 ++++++++++----------- 1 file changed, 52 insertions(+), 59 deletions(-) (limited to 'libjava/classpath/gnu/java/security/sig/ISignature.java') diff --git a/libjava/classpath/gnu/java/security/sig/ISignature.java b/libjava/classpath/gnu/java/security/sig/ISignature.java index e77f39d2cf1..ff25f29d9fa 100644 --- a/libjava/classpath/gnu/java/security/sig/ISignature.java +++ b/libjava/classpath/gnu/java/security/sig/ISignature.java @@ -41,28 +41,24 @@ package gnu.java.security.sig; import java.util.Map; /** - *

The visible methods of every signature-with-appendix scheme.

- * - *

The Handbook of Applied Cryptography (HAC), by A. Menezes & al. states: + * The visible methods of every signature-with-appendix scheme. + *

+ * The Handbook of Applied Cryptography (HAC), by A. Menezes & al. states: * "Digital signature schemes which require the message as input to the - * verification algorithm are called digital signature schemes with - * appendix. ... They rely on cryptographic hash functions rather than - * customised redundancy functions, and are less prone to existential forgery - * attacks."

- * - *

References:

+ * verification algorithm are called digital signature schemes with appendix. + * ... They rely on cryptographic hash functions rather than customised + * redundancy functions, and are less prone to existential forgery attacks." + *

+ * References: *

    - *
  1. Handbook of Applied - * Cryptography, Alfred J. Menezes, Paul C. van Oorschot and Scott A. - * Vanstone. Section 11.2.2 Digital signature schemes with appendix.
  2. + *
  3. Handbook of Applied + * Cryptography, Alfred J. Menezes, Paul C. van Oorschot and Scott A. + * Vanstone. Section 11.2.2 Digital signature schemes with appendix.
  4. *
*/ -public interface ISignature extends Cloneable +public interface ISignature + extends Cloneable { - - // Constants - // ------------------------------------------------------------------------- - /** Property name of the verifier's public key. */ public static final String VERIFIER_KEY = "gnu.crypto.sig.public.key"; @@ -71,96 +67,93 @@ public interface ISignature extends Cloneable /** * Property name of an optional {@link java.security.SecureRandom}, - * {@link java.util.Random}, or {@link gnu.crypto.prng.IRandom} instance to - * use. The default is to use a classloader singleton from - * {@link gnu.crypto.util.PRNG}. + * {@link java.util.Random}, or {@link gnu.java.security.prng.IRandom} + * instance to use. The default is to use a classloader singleton from + * {@link gnu.java.security.util.PRNG}. */ public static final String SOURCE_OF_RANDOMNESS = "gnu.crypto.sig.prng"; - // Methods - // ------------------------------------------------------------------------- - /** - *

Returns the canonical name of this signature scheme.

- * + * Returns the canonical name of this signature scheme. + * * @return the canonical name of this instance. */ String name(); /** - *

Initialises this instance for signature verification.

- * + * Initialises this instance for signature verification. + * * @param attributes the attributes to use for setting up this instance. * @throws IllegalArgumentException if the designated public key is not - * appropriate for this signature scheme. + * appropriate for this signature scheme. * @see #SOURCE_OF_RANDOMNESS * @see #VERIFIER_KEY */ void setupVerify(Map attributes) throws IllegalArgumentException; /** - *

Initialises this instance for signature generation.

- * + * Initialises this instance for signature generation. + * * @param attributes the attributes to use for setting up this instance. * @throws IllegalArgumentException if the designated private key is not - * appropriate for this signature scheme. + * appropriate for this signature scheme. * @see #SOURCE_OF_RANDOMNESS * @see #SIGNER_KEY */ void setupSign(Map attributes) throws IllegalArgumentException; /** - *

Digests one byte of a message for signing or verification purposes.

- * + * Digests one byte of a message for signing or verification purposes. + * * @param b the message byte to digest. - * @throws IllegalStateException if this instance was not setup for - * signature generation/verification. + * @throws IllegalStateException if this instance was not setup for signature + * generation/verification. */ void update(byte b) throws IllegalStateException; /** - *

Digests a sequence of bytes from a message for signing or verification - * purposes.

- * + * Digests a sequence of bytes from a message for signing or verification + * purposes. + * * @param buffer the byte sequence to consider. * @param offset the byte poisition in buffer of the first byte - * to consider. - * @param length the number of bytes in buffer starting from the - * byte at index offset to digest. - * @throws IllegalStateException if this instance was not setup for - * signature generation/verification. + * to consider. + * @param length the number of bytes in buffer starting from + * the byte at index offset to digest. + * @throws IllegalStateException if this instance was not setup for signature + * generation/verification. */ void update(byte[] buffer, int offset, int length) throws IllegalStateException; /** - *

Terminates a signature generation phase by digesting and processing the - * context of the underlying message digest algorithm instance.

- * + * Terminates a signature generation phase by digesting and processing the + * context of the underlying message digest algorithm instance. + * * @return a {@link Object} representing the native output of the signature - * scheme implementation. - * @throws IllegalStateException if this instance was not setup for - * signature generation. + * scheme implementation. + * @throws IllegalStateException if this instance was not setup for signature + * generation. */ Object sign() throws IllegalStateException; /** - *

Terminates a signature verification phase by digesting and processing - * the context of the underlying message digest algorithm instance.

- * + * Terminates a signature verification phase by digesting and processing the + * context of the underlying message digest algorithm instance. + * * @param signature a native signature object previously generated by an - * invocation of the sign() method. + * invocation of the sign() method. * @return true iff the outpout of the verification phase - * confirms that the designated signature object has been generated using the - * corresponding public key of the recepient. - * @throws IllegalStateException if this instance was not setup for - * signature verification. + * confirms that the designated signature object has been generated + * using the corresponding public key of the recepient. + * @throws IllegalStateException if this instance was not setup for signature + * verification. */ boolean verify(Object signature) throws IllegalStateException; /** - *

Returns a clone copy of this instance.

- * + * Returns a clone copy of this instance. + * * @return a clone copy of this instance. */ Object clone(); -- cgit v1.2.3