summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/gnu/javax/crypto/mode/IMode.java
diff options
context:
space:
mode:
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-14 23:12:35 +0000
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-14 23:12:35 +0000
commitffde862e033a0825e1e9972a89c0f1f80b261a8e (patch)
tree97037d2c09c8384d80531f67ec36a01205df6bdb /libjava/classpath/gnu/javax/crypto/mode/IMode.java
parentb415ff10527e977c3758234fd930e2c027bfa17d (diff)
downloadppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.tar.gz
ppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/gnu/javax/crypto/mode/IMode.java')
-rw-r--r--libjava/classpath/gnu/javax/crypto/mode/IMode.java114
1 files changed, 46 insertions, 68 deletions
diff --git a/libjava/classpath/gnu/javax/crypto/mode/IMode.java b/libjava/classpath/gnu/javax/crypto/mode/IMode.java
index 4cb6ca64bd9..30485117d45 100644
--- a/libjava/classpath/gnu/javax/crypto/mode/IMode.java
+++ b/libjava/classpath/gnu/javax/crypto/mode/IMode.java
@@ -41,105 +41,83 @@ package gnu.javax.crypto.mode;
import gnu.javax.crypto.cipher.IBlockCipher;
/**
- * <p>The basic visible methods of any block cipher mode.</p>
- *
- * <p>Block ciphers encrypt plaintext in fixed size n-bit blocks. For messages
+ * The basic visible methods of any block cipher mode.
+ * <p>
+ * Block ciphers encrypt plaintext in fixed size n-bit blocks. For messages
* larger than n bits, the simplest approach is to segment the message into
* n-bit blocks and process (encrypt and/or decrypt) each one separately
* (Electronic Codebook or ECB mode). But this approach has disadvantages in
* most applications. The block cipher modes of operations are one way of
- * working around those disadvantages.</p>
- *
- * <p>A <i>Mode</i> always employs an underlying block cipher for processing its
+ * working around those disadvantages.
+ * <p>
+ * A <i>Mode</i> always employs an underlying block cipher for processing its
* input. For all intents and purposes, a <i>Mode</i> appears to behave as any
- * other block cipher with the following differences:</p>
- *
+ * other block cipher with the following differences:
* <ul>
- * <li>Depending on the specifications of the mode, the block size may be
- * different that that of the underlying cipher.</li>
- *
- * <li>While some modes of operations allow operations on block sizes that
- * can be 1-bit long, this library will only deal with sizes that are
- * multiple of 8 bits. This is because the <tt>byte</tt> is the smallest,
- * easy to handle, primitive type in Java.</li>
- *
- * <li>Some modes need an <i>Initialisation Vector</i> (IV) to be properly
- * initialised.</li>
+ * <li>Depending on the specifications of the mode, the block size may be
+ * different that that of the underlying cipher.</li>
+ * <li>While some modes of operations allow operations on block sizes that can
+ * be 1-bit long, this library will only deal with sizes that are multiple of 8
+ * bits. This is because the <tt>byte</tt> is the smallest, easy to handle,
+ * primitive type in Java.</li>
+ * <li>Some modes need an <i>Initialisation Vector</i> (IV) to be properly
+ * initialised.</li>
* </ul>
- *
- * <p>Possible additional initialisation values for an instance of that type
- * are:</p>
- *
+ * <p>
+ * Possible additional initialisation values for an instance of that type are:
* <ul>
- * <li>The block size in which to operate this mode instance. This
- * value is <b>optional</b>, if unspecified, the underlying block cipher's
- * configured block size shall be used.</li>
- *
- * <li>Whether this mode will be used for encryption or decryption. This
- * value is <b>mandatory</b> and should be included in the initialisation
- * parameters. If it isn't, a {@link java.lang.IllegalStateException} will
- * be thrown if any method, other than <code>reset()</code> is invoked on the
- * instance.</li>
- *
- * <li>The byte array containing the <i>initialisation vector</i>, if
- * required by this type of mode.</li>
+ * <li>The block size in which to operate this mode instance. This value is
+ * <b>optional</b>, if unspecified, the underlying block cipher's configured
+ * block size shall be used.</li>
+ * <li>Whether this mode will be used for encryption or decryption. This value
+ * is <b>mandatory</b> and should be included in the initialisation parameters.
+ * If it isn't, a {@link java.lang.IllegalStateException} will be thrown if any
+ * method, other than <code>reset()</code> is invoked on the instance.</li>
+ * <li>The byte array containing the <i>initialisation vector</i>, if required
+ * by this type of mode.</li>
* </ul>
*/
-public interface IMode extends IBlockCipher
+public interface IMode
+ extends IBlockCipher
{
-
- // Constants
- // -------------------------------------------------------------------------
-
/**
- * <p>Property name of the state in which to operate this mode. The value
+ * Property name of the state in which to operate this mode. The value
* associated to this property name is taken to be an {@link Integer} which
- * value is either <code>ENCRYPTION</code> or <code>DECRYPTION</code>.</p>
+ * value is either <code>ENCRYPTION</code> or <code>DECRYPTION</code>.
*/
String STATE = "gnu.crypto.mode.state";
-
/**
- * <p>Property name of the block size in which to operate this mode. The
- * value associated with this property name is taken to be an {@link Integer}.
- * If it is not specified, the value of the block size of the underlying
- * block cipher, used to construct the mode instance, shall be used.</p>
+ * Property name of the block size in which to operate this mode. The value
+ * associated with this property name is taken to be an {@link Integer}. If
+ * it is not specified, the value of the block size of the underlying block
+ * cipher, used to construct the mode instance, shall be used.
*/
String MODE_BLOCK_SIZE = "gnu.crypto.mode.block.size";
-
/**
- * <p>Property name of the initialisation vector to use, if required, with
- * this instance. The value associated with this property name is taken to
- * be a byte array. If the concrete instance needs such a parameter, and it
- * has not been specified as part of the initialissation parameters, an
- * all-zero byte array of the appropriate size shall be used.</p>
+ * Property name of the initialisation vector to use, if required, with this
+ * instance. The value associated with this property name is taken to be a
+ * byte array. If the concrete instance needs such a parameter, and it has not
+ * been specified as part of the initialissation parameters, an all-zero byte
+ * array of the appropriate size shall be used.
*/
String IV = "gnu.crypto.mode.iv";
-
- /**
- * <p>Constant indicating the instance is being used for <i>encryption</i>.</p>
- */
+ /** Constant indicating the instance is being used for <i>encryption</i>. */
int ENCRYPTION = 1;
-
- /**
- * <p>Constant indicating the instance is being used for <i>decryption</i>.</p>
- */
+ /** Constant indicating the instance is being used for <i>decryption</i>. */
int DECRYPTION = 2;
- // Methods
- // -------------------------------------------------------------------------
-
/**
- * <p>A convenience method. Effectively invokes the <code>encryptBlock()</code>
+ * A convenience method. Effectively invokes the <code>encryptBlock()</code>
* or <code>decryptBlock()</code> method depending on the operational state
- * of the instance.</p>
- *
+ * of the instance.
+ *
* @param in the plaintext.
* @param inOffset index of <code>in</code> from which to start considering
- * data.
+ * data.
* @param out the ciphertext.
* @param outOffset index of <code>out</code> from which to store result.
* @exception IllegalStateException if the instance is not initialised.
*/
void update(byte[] in, int inOffset, byte[] out, int outOffset)
throws IllegalStateException;
-} \ No newline at end of file
+}
OpenPOWER on IntegriCloud