From 8207f1e8dbc63916f238f81dc46567c55090e95b Mon Sep 17 00:00:00 2001
From: Jesse Wilson
* This is the name of the transformation argument used in the * {@code getInstance} call creating this object. - *
- * + * * @return the name of the algorithm of this cipher instance. - * @since Android 1.0. */ public final String getAlgorithm() { return transformation; @@ -397,9 +373,8 @@ public class Cipher { /** * Returns this ciphers block size (in bytes). - * + * * @return this ciphers block size. - * @since Android 1.0 */ public final int getBlockSize() { return spiImpl.engineGetBlockSize(); @@ -408,13 +383,12 @@ public class Cipher { /** * Returns the length in bytes an output buffer needs to be when this cipher * is updated with {@code inputLen} bytes. - * + * * @param inputLen * the number of bytes of the input. * @return the output buffer length for the input length. * @throws IllegalStateException * if this cipher instance is in an invalid state. - * @since Android 1.0 */ public final int getOutputSize(int inputLen) { if (mode == 0) { @@ -426,9 +400,8 @@ public class Cipher { /** * Returns the initialization vector for this cipher instance. - * + * * @return the initialization vector for this cipher instance. - * @since Android 1.0 */ public final byte[] getIV() { return spiImpl.engineGetIV(); @@ -440,11 +413,10 @@ public class Cipher { * These may be a the same parameters that were used to create this cipher * instance, or may be a combination of default and random parameters, * depending on the underlying cipher implementation. - * + * * @return the parameters that where used to create this cipher instance, or * {@code null} if this cipher instance does not have any * parameters. - * @since Android 1.0 */ public final AlgorithmParameters getParameters() { return spiImpl.engineGetParameters(); @@ -452,9 +424,8 @@ public class Cipher { /** * Returns the exemption mechanism associated with this cipher. - * + * * @return currently {@code null} - * @since Android 1.0 */ public final ExemptionMechanism getExemptionMechanism() { //FIXME implement getExemptionMechanism @@ -473,7 +444,7 @@ public class Cipher { * The cipher is initialized for the specified operational mode (one of: * encryption, decryption, key wrapping or key unwrapping) depending on * {@code opmode}. - * + ** If this cipher instance needs any algorithm parameters or random values * that the specified key can not provide, the underlying implementation of * this cipher is supposed to generate the required parameters (using its @@ -483,8 +454,7 @@ public class Cipher { * init} methods, the state of the instance is overridden, meaning that it * is equivalent to creating a new instance and calling its {@code init} * method. - *
- * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -494,7 +464,6 @@ public class Cipher { * @throws InvalidKeyException * if the specified key can not be used to initialize this * cipher instance. - * @since Android 1.0 */ public final void init(int opmode, Key key) throws InvalidKeyException { if (sec_rand == null) { @@ -513,7 +482,7 @@ public class Cipher { * The cipher is initialized for the specified operational mode (one of: * encryption, decryption, key wrapping or key unwrapping) depending on * {@code opmode}. - * + ** If this cipher instance needs any algorithm parameters or random values * that the specified key can not provide, the underlying implementation of * this cipher is supposed to generate the required parameters (using its @@ -523,8 +492,7 @@ public class Cipher { * When a cipher instance is initialized by a call to any of the {@code * init} methods, the state of the instance is overridden, means it is * equivalent to creating a new instance and calling it {@code init} method. - *
- * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -538,7 +506,6 @@ public class Cipher { * cipher instance. * @throws InvalidParameterException * if the specified opmode is invalid. - * @since Android 1.0 */ public final void init(int opmode, Key key, SecureRandom random) throws InvalidKeyException { @@ -559,7 +526,7 @@ public class Cipher { ** The cipher is initialized for the specified operational mode (one of: * encryption, decryption, key wrapping or key unwrapping). - *
+ ** If this cipher instance needs any algorithm parameters and {@code params} * is {@code null}, the underlying implementation of this cipher is supposed * to generate the required parameters (using its provider or random @@ -568,8 +535,7 @@ public class Cipher { * When a cipher instance is initialized by a call to any of the {@code * init} methods, the state of the instance is overridden, means it is * equivalent to creating a new instance and calling it {@code init} method. - *
- * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -584,7 +550,6 @@ public class Cipher { * @throws InvalidAlgorithmParameterException * it the specified parameters are inappropriate for this * cipher. - * @since Android 1.0 */ public final void init(int opmode, Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException { @@ -611,7 +576,7 @@ public class Cipher { * init} methods, the state of the instance is overridden, meaning that it * is equivalent to creating a new instance and calling it {@code init} * method. - * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -630,7 +595,6 @@ public class Cipher { * cipher. * @throws InvalidParameterException * if the specified {@code opmode} is invalid. - * @since Android 1.0 */ public final void init(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, @@ -656,7 +620,7 @@ public class Cipher { * The cipher is initialized for the specified operation (one of: * encryption, decryption, key wrapping or key unwrapping) depending on * {@code opmode}. - * + ** If this cipher instance needs any algorithm parameters and {@code params} * is {@code null}, the underlying implementation of this cipher is supposed * to generate the required parameters (using its provider or random @@ -666,8 +630,7 @@ public class Cipher { * init} methods, the state of the instance is overridden, meaning that it * is equivalent to creating a new instance and calling it {@code init} * method. - *
- * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -682,7 +645,6 @@ public class Cipher { * @throws InvalidAlgorithmParameterException * it the specified parameters are inappropriate for this * cipher. - * @since Android 1.0 */ public final void init(int opmode, Key key, AlgorithmParameters params) throws InvalidKeyException, InvalidAlgorithmParameterException { @@ -699,7 +661,7 @@ public class Cipher { * The cipher will be initialized for the specified operation (one of: * encryption, decryption, key wrapping or key unwrapping) depending on * {@code opmode}. - * + ** If this cipher instance needs any algorithm parameters and {@code params} * is {@code null}, the underlying implementation of this cipher is supposed * to generate the required parameters (using its provider or random @@ -708,8 +670,7 @@ public class Cipher { * When a cipher instance is initialized by a call to any of the {@code * init} methods, the state of the instance is overridden, means it is * equivalent to creating a new instance and calling it {@code init} method. - *
- * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -728,7 +689,6 @@ public class Cipher { * cipher. * @throws InvalidParameterException * if the specified {@code opmode} is invalid. - * @since Android 1.0 */ public final void init(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, @@ -768,7 +728,7 @@ public class Cipher { * When a cipher instance is initialized by a call to any of the {@code * init} methods, the state of the instance is overridden, means it is * equivalent to creating a new instance and calling it {@code init} method. - * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -778,7 +738,6 @@ public class Cipher { * @throws InvalidKeyException * if the public key in the certificate can not be used to * initialize this cipher instance. - * @since Android 1.0 */ public final void init(int opmode, Certificate certificate) throws InvalidKeyException { @@ -795,7 +754,7 @@ public class Cipher { * The cipher will be initialized for the specified operation (one of: * encryption, decryption, key wrapping or key unwrapping) depending on * {@code opmode}. - * + ** It the type of the certificate is X.509 and the certificate has a key * usage extension field marked as critical, the specified {@code * opmode} has the be enabled for this key, otherwise an {@code @@ -806,11 +765,11 @@ public class Cipher { * cipher is supposed to generate the required parameters (using its * provider or random values). Random values are generated using {@code * random}. - *
+ ** When a cipher instance is initialized by a call to any of the {@code * init} methods, the state of the instance is overridden, means it is * equivalent to creating a new instance and calling it {@code init} method. - * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -822,7 +781,6 @@ public class Cipher { * @throws InvalidKeyException * if the public key in the certificate can not be used to * initialize this cipher instance. - * @since Android 1.0 */ public final void init(int opmode, Certificate certificate, SecureRandom random) throws InvalidKeyException { @@ -874,7 +832,7 @@ public class Cipher { /** * Continues a multi-part transformation (encryption or decryption). The * transformed bytes are returned. - * + * * @param input * the input bytes to transform. * @return the transformed bytes in a new buffer, or {@code null} if the @@ -884,7 +842,6 @@ public class Cipher { * decryption. * @throws IllegalArgumentException * if the input is {@code null}. - * @since Android 1.0 */ public final byte[] update(byte[] input) { if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) { @@ -903,7 +860,7 @@ public class Cipher { /** * Continues a multi-part transformation (encryption or decryption). The * transformed bytes are returned. - * + * * @param input * the input bytes to transform. * @param inputOffset @@ -919,7 +876,6 @@ public class Cipher { * if the input is {@code null}, or if {@code inputOffset} and * {@code inputLen} do not specify a valid chunk in the input * buffer. - * @since Android 1.0 */ public final byte[] update(byte[] input, int inputOffset, int inputLen) { if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) { @@ -949,8 +905,7 @@ public class Cipher { * a {@code ShortBufferException} is thrown. Use * {@link Cipher#getOutputSize getOutputSize} to check for the size of the * output buffer. - *
- * + * * @param input * the input bytes to transform. * @param inputOffset @@ -969,7 +924,6 @@ public class Cipher { * if the input is {@code null}, the output is {@code null}, or * if {@code inputOffset} and {@code inputLen} do not specify a * valid chunk in the input buffer. - * @since Android 1.0 */ public final int update(byte[] input, int inputOffset, int inputLen, byte[] output) throws ShortBufferException { @@ -984,8 +938,7 @@ public class Cipher { * a {@code ShortBufferException} is thrown. Use * {@link Cipher#getOutputSize getOutputSize} to check for the size of the * output buffer. - * - * + * * @param input * the input bytes to transform. * @param inputOffset @@ -1006,7 +959,6 @@ public class Cipher { * if the input is {@code null}, the output is {@code null}, or * if {@code inputOffset} and {@code inputLen} do not specify a * valid chunk in the input buffer. - * @since Android 1.0 */ public final int update(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException { @@ -1046,8 +998,7 @@ public class Cipher { * bytes a {@code ShortBufferException} is thrown. Use * {@link Cipher#getOutputSize getOutputSize} to check for the size of the * output buffer. - * - * + * * @param input * the input buffer to transform. * @param output @@ -1061,7 +1012,6 @@ public class Cipher { * @throws IllegalArgumentException * if the input buffer and the output buffer are the identical * object. - * @since Android 1.0 */ public final int update(ByteBuffer input, ByteBuffer output) throws ShortBufferException { @@ -1081,8 +1031,7 @@ public class Cipher { ** Processes any bytes that may have been buffered in previous {@code * update} calls. - *
- * + * * @return the final bytes from the transformation. * @throws IllegalBlockSizeException * if the size of the resulting bytes is not a multiple of the @@ -1092,7 +1041,6 @@ public class Cipher { * @throws IllegalStateException * if this cipher instance is not initialized for encryption or * decryption. - * @since Android 1.0 */ public final byte[] doFinal() throws IllegalBlockSizeException, BadPaddingException { @@ -1108,9 +1056,9 @@ public class Cipher { ** Processes any bytes that may have been buffered in previous {@code * update} calls. - *
+ ** The final transformed bytes are stored in the {@code output} buffer. - * + * * @param output * the output buffer. * @param outputOffset @@ -1126,7 +1074,6 @@ public class Cipher { * @throws IllegalStateException * if this cipher instance is not initialized for encryption or * decryption. - * @since Android 1.0 */ public final int doFinal(byte[] output, int outputOffset) throws IllegalBlockSizeException, ShortBufferException, @@ -1147,8 +1094,7 @@ public class Cipher { *
* Processes the bytes in {@code input} buffer, and any bytes that have been * buffered in previous {@code update} calls. - *
- * + * * @param input * the input buffer. * @return the final bytes from the transformation. @@ -1160,7 +1106,6 @@ public class Cipher { * @throws IllegalStateException * if this cipher instance is not initialized for encryption or * decryption. - * @since Android 1.0 */ public final byte[] doFinal(byte[] input) throws IllegalBlockSizeException, BadPaddingException { @@ -1177,7 +1122,7 @@ public class Cipher { * Processes the {@code inputLen} bytes in {@code input} buffer at {@code * inputOffset}, and any bytes that have been buffered in previous {@code * update} calls. - * + * * @param input * the input buffer. * @param inputOffset @@ -1196,7 +1141,6 @@ public class Cipher { * @throws IllegalArgumentException * if {@code inputOffset} and {@code inputLen} do not specify an * valid chunk in the input buffer. - * @since Android 1.0 */ public final byte[] doFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException { @@ -1218,7 +1162,7 @@ public class Cipher { * Processes the {@code inputLen} bytes in {@code input} buffer at {@code * inputOffset}, and any bytes that have been buffered in previous {@code * update} calls. - * + * * @param input * the input buffer. * @param inputOffset @@ -1241,7 +1185,6 @@ public class Cipher { * @throws IllegalArgumentException * if {@code inputOffset} and {@code inputLen} do not specify an * valid chunk in the input buffer. - * @since Android 1.0 */ public final int doFinal(byte[] input, int inputOffset, int inputLen, byte[] output) throws ShortBufferException, @@ -1255,8 +1198,7 @@ public class Cipher { * Processes the {@code inputLen} bytes in {@code input} buffer at {@code * inputOffset}, and any bytes that have been buffered in previous {@code * update} calls. - * - * + * * @param input * the input buffer. * @param inputOffset @@ -1281,7 +1223,6 @@ public class Cipher { * @throws IllegalArgumentException * if {@code inputOffset} and {@code inputLen} do not specify an * valid chunk in the input buffer. - * @since Android 1.0 */ public final int doFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException, @@ -1306,8 +1247,7 @@ public class Cipher { * {@code input.position()}, and any bytes that have been buffered in * previous {@code update} calls. The transformed bytes are placed into * {@code output} buffer. - * - * + * * @param input * the input buffer. * @param output @@ -1326,7 +1266,6 @@ public class Cipher { * @throws IllegalStateException * if this cipher instance is not initialized for encryption or * decryption. - * @since Android 1.0 */ public final int doFinal(ByteBuffer input, ByteBuffer output) throws ShortBufferException, IllegalBlockSizeException, @@ -1344,7 +1283,7 @@ public class Cipher { /** * Wraps a key using this cipher instance. - * + * * @param key * the key to wrap. * @return the wrapped key. @@ -1355,7 +1294,6 @@ public class Cipher { * if this cipher instance can not wrap this key. * @throws IllegalStateException * if this cipher instance is not initialized for wrapping. - * @since Android 1.0 */ public final byte[] wrap(Key key) throws IllegalBlockSizeException, InvalidKeyException { @@ -1368,7 +1306,7 @@ public class Cipher { /** * Unwraps a key using this cipher instance. - * + * * @param wrappedKey * the wrapped key to unwrap. * @param wrappedKeyAlgorithm @@ -1386,7 +1324,6 @@ public class Cipher { * {@code wrappedKeyType} for the {@code wrappedKeyAlgorithm}. * @throws IllegalStateException * if this cipher instance is not initialized for unwrapping. - * @since Android 1.0 */ public final Key unwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, @@ -1401,7 +1338,7 @@ public class Cipher { /** * Returns the maximum key length for the specified transformation. - * + * * @param transformation * the transformation name. * @return the maximum key length, currently {@code Integer.MAX_VALUE}. @@ -1410,7 +1347,6 @@ public class Cipher { * be found. * @throws NullPointerException * if {@code transformation} is {@code null}. - * @since Android 1.0 */ public static final int getMaxAllowedKeyLength(String transformation) throws NoSuchAlgorithmException { @@ -1425,7 +1361,7 @@ public class Cipher { /** * Returns the maximum cipher parameter value for the specified * transformation. If there is no maximum limit, {@code null} is returned. - * + * * @param transformation * the transformation name. * @return a parameter spec holding the maximum value or {@code null}. @@ -1435,7 +1371,6 @@ public class Cipher { * be found. * @throws NullPointerException * if {@code transformation} is {@code null}. - * @since Android 1.0 */ public static final AlgorithmParameterSpec getMaxAllowedParameterSpec( String transformation) throws NoSuchAlgorithmException { diff --git a/libcore/crypto/src/main/java/javax/crypto/CipherInputStream.java b/libcore/crypto/src/main/java/javax/crypto/CipherInputStream.java index ca64c49d6..b2c626d6d 100644 --- a/libcore/crypto/src/main/java/javax/crypto/CipherInputStream.java +++ b/libcore/crypto/src/main/java/javax/crypto/CipherInputStream.java @@ -32,9 +32,6 @@ import java.security.GeneralSecurityException; * by a {@code CipherInputStream}. For example, if a cipher initialized for * decryption is used with a {@code CipherInputStream}, the {@code * CipherInputStream} tries to read the data an decrypt them before returning. - * - * - * @since Android 1.0 */ public class CipherInputStream extends FilterInputStream { @@ -48,12 +45,11 @@ public class CipherInputStream extends FilterInputStream { /** * Creates a new {@code CipherInputStream} instance for an {@code * InputStream} and a cipher. - * + * * @param is * the input stream to read data from. * @param c * the cipher to process the data with. - * @since Android 1.0 */ public CipherInputStream(InputStream is, Cipher c) { super(is); @@ -65,11 +61,9 @@ public class CipherInputStream extends FilterInputStream { * InputStream} without a cipher. ** A {@code NullCipher} is created and used to process the data. - *
- * + * * @param is * the input stream to read data from. - * @since Android 1.0 */ protected CipherInputStream(InputStream is) { this(is, new NullCipher()); @@ -77,11 +71,10 @@ public class CipherInputStream extends FilterInputStream { /** * Reads the next byte from this cipher input stream. - * + * * @return the next byte, or {@code -1} if the end of the stream is reached. * @throws IOException * if an error occurs. - * @since Android 1.0 */ @Override public int read() throws IOException { @@ -114,14 +107,13 @@ public class CipherInputStream extends FilterInputStream { /** * Reads the next {@code b.length} bytes from this input stream into buffer * {@code b}. - * + * * @param b * the buffer to be filled with data. * @return the number of bytes filled into buffer {@code b}, or {@code -1} * if the end of the stream is reached. * @throws IOException * if an error occurs. - * @since Android 1.0 */ @Override public int read(byte[] b) throws IOException { @@ -134,8 +126,7 @@ public class CipherInputStream extends FilterInputStream { ** if {@code b} is {@code null}, the next {@code len} bytes are read and * discarded. - *
- * + * * @param b * the buffer to be filled with data. * @param off @@ -148,7 +139,6 @@ public class CipherInputStream extends FilterInputStream { * if an error occurs. * @throws NullPointerException * if the underlying input stream is {@code null}. - * @since Android 1.0 */ @Override public int read(byte[] b, int off, int len) throws IOException { @@ -175,15 +165,12 @@ public class CipherInputStream extends FilterInputStream { * The number of bytes skipped depends on the result of a call to * {@link CipherInputStream#available() available}. The smaller of n and the * result are the number of bytes being skipped. - * - * Skipping is (currently) not supported in Android. - * + * * @param n * the number of bytes that should be skipped. * @return the number of bytes actually skipped. * @throws IOException * if an error occurs - * @since Android 1.0 */ @Override public long skip(long n) throws IOException { @@ -199,13 +186,11 @@ public class CipherInputStream extends FilterInputStream { } /** - * Returns the number of bytes available without blocking. It (currently) - * always returns {@code 0} in Android. - * + * Returns the number of bytes available without blocking. + * * @return the number of bytes available, currently zero. * @throws IOException * if an error occurs - * @since Android 1.0 */ @Override public int available() throws IOException { @@ -215,10 +200,9 @@ public class CipherInputStream extends FilterInputStream { /** * Closes this {@code CipherInputStream}, also closes the underlying input * stream and call {@code doFinal} on the cipher object. - * + * * @throws IOException * if an error occurs. - * @since Android 1.0 */ @Override public void close() throws IOException { @@ -232,15 +216,15 @@ public class CipherInputStream extends FilterInputStream { } /** - * Returns whether this input stream supports {@code mark} and {@code reset} - * , which it does not. - * + * Returns whether this input stream supports {@code mark} and + * {@code reset}, which it does not. + * * @return false, since this input stream does not support {@code mark} and * {@code reset}. - * @since Android 1.0 */ @Override public boolean markSupported() { return false; } } + diff --git a/libcore/crypto/src/main/java/javax/crypto/CipherOutputStream.java b/libcore/crypto/src/main/java/javax/crypto/CipherOutputStream.java index 8bce42bbc..1f95b99f3 100644 --- a/libcore/crypto/src/main/java/javax/crypto/CipherOutputStream.java +++ b/libcore/crypto/src/main/java/javax/crypto/CipherOutputStream.java @@ -31,9 +31,6 @@ import javax.crypto.NullCipher; * by a {@code CipherOutputStream}. For example, if a cipher initialized for * encryption is used with a {@code CipherOutputStream}, the {@code * CipherOutputStream} tries to encrypt the data writing it out. - * - * - * @since Android 1.0 */ public class CipherOutputStream extends FilterOutputStream { @@ -43,12 +40,11 @@ public class CipherOutputStream extends FilterOutputStream { /** * Creates a new {@code CipherOutputStream} instance for an {@code * OutputStream} and a {@code Cipher}. - * + * * @param os * the output stream to write data to. * @param c * the cipher to process the data with. - * @since Android 1.0 */ public CipherOutputStream(OutputStream os, Cipher c) { super(os); @@ -60,11 +56,9 @@ public class CipherOutputStream extends FilterOutputStream { * OutputStream} without a cipher. ** A {@code NullCipher} is created to process the data. - *
- * + * * @param os * the output stream to write the data to. - * @since Android 1.0 */ protected CipherOutputStream(OutputStream os) { this(os, new NullCipher()); @@ -72,12 +66,11 @@ public class CipherOutputStream extends FilterOutputStream { /** * Writes the single byte to this cipher output stream. - * + * * @param b * the byte to write. * @throws IOException * if an error occurs. - * @since Android 1.0 */ @Override public void write(int b) throws IOException { @@ -91,12 +84,11 @@ public class CipherOutputStream extends FilterOutputStream { /** * Writes the buffer of bytes to this cipher output stream. - * + * * @param b * the buffer of bytes. * @throws IOException * if an error occurs. - * @since Android 1.0 */ @Override public void write(byte[] b) throws IOException { @@ -106,7 +98,7 @@ public class CipherOutputStream extends FilterOutputStream { /** * Writes the {@code len} bytes from buffer {@code b} starting at offset * {@code off} to this cipher output stream. - * + * * @param b * the buffer. * @param off @@ -115,7 +107,6 @@ public class CipherOutputStream extends FilterOutputStream { * the number of bytes. * @throws IOException * if an error occurs. - * @since Android 1.0 */ @Override public void write(byte[] b, int off, int len) throws IOException { @@ -130,7 +121,7 @@ public class CipherOutputStream extends FilterOutputStream { /** * Flushes this cipher output stream. - * + * * @throws IOException * if an error occurs */ @@ -145,7 +136,7 @@ public class CipherOutputStream extends FilterOutputStream { * On the underlying cipher {@code doFinal} will be invoked, and any * buffered bytes from the cipher are also written out, and the cipher is * reset to its initial state. The underlying output stream is also closed. - * + * * @throws IOException * if an error occurs. */ @@ -173,3 +164,4 @@ public class CipherOutputStream extends FilterOutputStream { } } } + diff --git a/libcore/crypto/src/main/java/javax/crypto/CipherSpi.java b/libcore/crypto/src/main/java/javax/crypto/CipherSpi.java index f6da9295e..50fdd497a 100644 --- a/libcore/crypto/src/main/java/javax/crypto/CipherSpi.java +++ b/libcore/crypto/src/main/java/javax/crypto/CipherSpi.java @@ -44,7 +44,7 @@ import org.apache.harmony.crypto.internal.nls.Messages; * * The following behavior should be implemented for obtaining {@code Cipher} * instances. - * + ** When one of the {@link Cipher#getInstance} factory methods is called with a * transformation that is only an algorithm, check if the provider * defines a {@code CipherSpi} for "algorithm", if so: return it, otherwise @@ -76,53 +76,46 @@ import org.apache.harmony.crypto.internal.nls.Messages; * padding name and return it, otherwise throw a * {@link NoSuchAlgorithmException}. * - *
- * + * * @see Cipher - * @since Android 1.0 */ public abstract class CipherSpi { /** * Creates a new {@code CipherSpi} instance. - * - * @since Android 1.0 */ public CipherSpi() { } /** * Sets the mode for this cipher. - * + * * @param mode * the name of the cipher mode. * @throws NoSuchAlgorithmException * if the specified cipher mode is not supported by this * provider. - * @since Android 1.0 */ protected abstract void engineSetMode(String mode) throws NoSuchAlgorithmException; /** * Sets the padding method for this cipher. - * + * * @param padding * the name of the padding method. * @throws NoSuchPaddingException * if the specified padding method is not supported by this * cipher. - * @since Android 1.0 */ protected abstract void engineSetPadding(String padding) throws NoSuchPaddingException; /** * Returns the block size of this cipher (in bytes) - * + * * @return the block size of this cipher, or zero if this cipher is not a * block cipher. - * @since Android 1.0 */ protected abstract int engineGetBlockSize(); @@ -133,21 +126,18 @@ public abstract class CipherSpi { ** The actual output length of the next call to {@code update} or {@code * doFinal} may be smaller than the length returned by this method. - *
- * + * * @param inputLen * the length of the input (in bytes). * @return the size for a buffer (in bytes). - * @since Android 1.0 */ protected abstract int engineGetOutputSize(int inputLen); /** * Returns the Initialization Vector (IV) that was used to initialize this * cipher or {@code null} if none was used. - * + * * @return the Initialization Vector (IV), or {@code null} if none was used. - * @since Android 1.0 */ protected abstract byte[] engineGetIV(); @@ -157,12 +147,10 @@ public abstract class CipherSpi { * These may be a the same parameters that were used to create this cipher * instance, or may be a combination of default and random parameters, * depending on the underlying cipher implementation. - * - * + * * @return the parameters that where used to create this cipher instance, or * {@code null} if this cipher instance does not have any parameters * at all. - * @since Android 1.0 */ protected abstract AlgorithmParameters engineGetParameters(); @@ -173,7 +161,7 @@ public abstract class CipherSpi { * The cipher will be initialized for the specified operation (one of: * encryption, decryption, key wrapping or key unwrapping) depending on * {@code opmode}. - * + ** If this cipher instance needs any algorithm parameters or random values * that the specified key cannot provide, the underlying implementation of * this cipher is supposed to generate the required parameters (using its @@ -183,8 +171,7 @@ public abstract class CipherSpi { * When a cipher instance is initialized by a call to any of the {@code * init} methods, the state of the instance is overridden, means it is * equivalent to creating a new instance and calling it {@code init} method. - *
- * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -196,7 +183,6 @@ public abstract class CipherSpi { * @throws InvalidKeyException * if the specified key cannot be used to initialize this cipher * instance. - * @since Android 1.0 */ protected abstract void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException; @@ -208,7 +194,7 @@ public abstract class CipherSpi { * The cipher will be initialized for the specified operation (one of: * encryption, decryption, key wrapping or key unwrapping) depending on * {@code opmode}. - * + ** If this cipher instance needs any algorithm parameters and {@code params} * is {@code null}, the underlying implementation of this cipher is supposed * to generate the required parameters (using its provider or random @@ -217,8 +203,7 @@ public abstract class CipherSpi { * When a cipher instance is initialized by a call to any of the {@code * init} methods, the state of the instance is overridden, means it is * equivalent to creating a new instance and calling it {@code init} method. - *
- * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -235,7 +220,6 @@ public abstract class CipherSpi { * @throws InvalidAlgorithmParameterException * it the specified parameters are inappropriate for this * cipher. - * @since Android 1.0 */ protected abstract void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) @@ -248,7 +232,7 @@ public abstract class CipherSpi { * The cipher will be initialized for the specified operation (one of: * encryption, decryption, key wrapping or key unwrapping) depending on * {@code opmode}. - * + ** If this cipher instance needs any algorithm parameters and {@code params} * is {@code null}, the underlying implementation of this cipher is supposed * to generate the required parameters (using its provider or random @@ -257,8 +241,7 @@ public abstract class CipherSpi { * When a cipher instance is initialized by a call to any of the {@code * init} methods, the state of the instance is overridden, means it is * equivalent to creating a new instance and calling it {@code init} method. - *
- * + * * @param opmode * the operation this cipher instance should be initialized for * (one of: {@code ENCRYPT_MODE}, {@code DECRYPT_MODE}, {@code @@ -275,7 +258,6 @@ public abstract class CipherSpi { * @throws InvalidAlgorithmParameterException * if the specified parameters are inappropriate for this * cipher. - * @since Android 1.0 */ protected abstract void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) @@ -284,7 +266,7 @@ public abstract class CipherSpi { /** * Continues a multi-part transformation (encryption or decryption). The * transformed bytes are returned. - * + * * @param input * the input bytes to transform. * @param inputOffset @@ -299,7 +281,6 @@ public abstract class CipherSpi { * @throws IllegalArgumentException * if the input is null, or if {@code inputOffset} and {@code * inputLen} do not specify a valid chunk in the input buffer. - * @since Android 1.0 */ protected abstract byte[] engineUpdate(byte[] input, int inputOffset, int inputLen); @@ -312,8 +293,7 @@ public abstract class CipherSpi { * a {@code ShortBufferException} is thrown. Use * {@link Cipher#getOutputSize getOutputSize} to check for the size of the * output buffer. - * - * + * * @param input * the input bytes to transform. * @param inputOffset @@ -327,7 +307,6 @@ public abstract class CipherSpi { * @return the number of bytes placed in output. * @throws ShortBufferException * if the size of the {@code output} buffer is too small. - * @since Android 1.0 */ protected abstract int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) @@ -342,8 +321,7 @@ public abstract class CipherSpi { * bytes a {@code ShortBufferException} is thrown. Use * {@link Cipher#getOutputSize getOutputSize} to check for the size of the * output buffer. - * - * + * * @param input * the input buffer to transform. * @param output @@ -351,7 +329,6 @@ public abstract class CipherSpi { * @return the number of bytes stored in the output buffer. * @throws ShortBufferException * if the size of the {@code output} buffer is too small. - * @since Android 1.0 */ protected int engineUpdate(ByteBuffer input, ByteBuffer output) throws ShortBufferException { @@ -395,8 +372,7 @@ public abstract class CipherSpi { * Processes the {@code inputLen} bytes in {@code input} buffer at {@code * inputOffset}, and any bytes that have been buffered in previous {@code * update} calls. - * - * + * * @param input * the input buffer. * @param inputOffset @@ -409,7 +385,6 @@ public abstract class CipherSpi { * cipher block size. * @throws BadPaddingException * if the padding of the data does not match the padding scheme. - * @since Android 1.0 */ protected abstract byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException; @@ -418,10 +393,9 @@ public abstract class CipherSpi { * Finishes a multi-part transformation (encryption or decryption). ** Processes the {@code inputLen} bytes in {@code input} buffer at - * {@code inputOffset}, and any bytes that have been buffered in previous + * {@code inputOffset}, and any bytes that have been buffered in previous * {@code update} calls. - *
- * + * * @param input * the input buffer. * @param inputOffset @@ -440,7 +414,6 @@ public abstract class CipherSpi { * cipher block size. * @throws BadPaddingException * if the padding of the data does not match the padding scheme. - * @since Android 1.0 */ protected abstract int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) @@ -454,8 +427,7 @@ public abstract class CipherSpi { * {@code input.position()}, and any bytes that have been buffered in * previous {@code update} calls. The transformed bytes are placed into * {@code output} buffer. - * - * + * * @param input * the input buffer. * @param output @@ -519,7 +491,7 @@ public abstract class CipherSpi { * this class (for backwards compatibility, it cannot be abstract). If this * method is not overridden, it throws an {@code * UnsupportedOperationException}. - * + * * @param key * the key to wrap. * @return the wrapped key @@ -528,7 +500,6 @@ public abstract class CipherSpi { * cipher block size. * @throws InvalidKeyException * if this cipher instance cannot wrap this key. - * @since Android 1.0 */ protected byte[] engineWrap(Key key) throws IllegalBlockSizeException, InvalidKeyException { @@ -542,8 +513,7 @@ public abstract class CipherSpi { * This method has been added to this class (for backwards compatibility, it * cannot be abstract). If this method is not overridden, it throws an * {@code UnsupportedOperationException}. - * - * + * * @param wrappedKey * the wrapped key to unwrap. * @param wrappedKeyAlgorithm @@ -559,7 +529,6 @@ public abstract class CipherSpi { * @throws NoSuchAlgorithmException * if no provider can be found that can create a key of type * {@code wrappedKeyType} for the {@code wrappedKeyAlgorithm}. - * @since Android 1.0 */ protected Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, @@ -573,17 +542,16 @@ public abstract class CipherSpi { * added to this class (for backwards compatibility, it cannot be abstract). * If this method is not overridden, it throws an {@code * UnsupportedOperationException}. - * + * * @param key * the key to get the size for. * @return the size of a specified key object in bits. * @throws InvalidKeyException * if the size of the key cannot be determined by this * implementation. - * @since Android 1.0 */ protected int engineGetKeySize(Key key) throws InvalidKeyException { throw new UnsupportedOperationException( Messages.getString("crypto.12")); //$NON-NLS-1$ } -} +} \ No newline at end of file diff --git a/libcore/crypto/src/main/java/javax/crypto/EncryptedPrivateKeyInfo.java b/libcore/crypto/src/main/java/javax/crypto/EncryptedPrivateKeyInfo.java index 301cd4924..2d0fd259d 100644 --- a/libcore/crypto/src/main/java/javax/crypto/EncryptedPrivateKeyInfo.java +++ b/libcore/crypto/src/main/java/javax/crypto/EncryptedPrivateKeyInfo.java @@ -46,7 +46,6 @@ import org.apache.harmony.security.x509.AlgorithmIdentifier; * #8 - Private-Key Information Syntax Standard. ** The definition of ASN.1 is as follows: - *
** Since a {@code SealedObject} instance is a serializable object itself it can * either be stored or transmitted over an insecure channel. - *
+ ** The wrapped object can later be decrypted (unsealed) using the corresponding * key and then be deserialized to retrieve the original object.The sealed * object itself keeps track of the cipher and corresponding parameters. - * - * @since Android 1.0 */ public class SealedObject implements Serializable { - // the value of this field was derived by using serialver utility - /** - * @com.intel.drl.spec_ref - */ private static final long serialVersionUID = 4482838265551344752L; /** @@ -76,8 +70,7 @@ public class SealedObject implements Serializable { * and sealing it using the specified cipher. *
* The cipher must be fully initialized. - *
- * + * * @param object * the object to seal, can be {@code null}. * @param c @@ -90,7 +83,6 @@ public class SealedObject implements Serializable { * size. * @throws NullPointerException * if the cipher is {@code null}. - * @since Android 1.0 */ public SealedObject(Serializable object, Cipher c) throws IOException, IllegalBlockSizeException { @@ -117,10 +109,9 @@ public class SealedObject implements Serializable { /** * Creates a new {@code SealedObject} instance by copying the data from * the specified object. - * + * * @param so * the object to copy. - * @since Android 1.0 */ protected SealedObject(SealedObject so) { if (so == null) { @@ -134,9 +125,8 @@ public class SealedObject implements Serializable { /** * Returns the algorithm this object was sealed with. - * + * * @return the algorithm this object was sealed with. - * @since Android 1.0 */ public final String getAlgorithm() { return sealAlg; @@ -144,7 +134,7 @@ public class SealedObject implements Serializable { /** * Returns the wrapped object, decrypting it using the specified key. - * + * * @param key * the key to decrypt the data with. * @return the encapsulated object. @@ -156,7 +146,6 @@ public class SealedObject implements Serializable { * if the algorithm to decrypt the data is not available. * @throws InvalidKeyException * if the specified key cannot be used to decrypt the data. - * @since Android 1.0 */ public final Object getObject(Key key) throws IOException, ClassNotFoundException, @@ -207,7 +196,7 @@ public class SealedObject implements Serializable { /** * Returns the wrapped object, decrypting it using the specified * cipher. - * + * * @param c * the cipher to decrypt the data. * @return the encapsulated object. @@ -221,7 +210,6 @@ public class SealedObject implements Serializable { * size. * @throws BadPaddingException * if the padding of the data does not match the padding scheme. - * @since Android 1.0 */ public final Object getObject(Cipher c) throws IOException, ClassNotFoundException, @@ -239,7 +227,7 @@ public class SealedObject implements Serializable { /** * Returns the wrapped object, decrypting it using the specified key. The * specified provider is used to retrieve the cipher algorithm. - * + * * @param key * the key to decrypt the data. * @param provider @@ -255,7 +243,6 @@ public class SealedObject implements Serializable { * if the specified provider is not available. * @throws InvalidKeyException * if the specified key cannot be used to decrypt the data. - * @since Android 1.0 */ public final Object getObject(Key key, String provider) throws IOException, ClassNotFoundException, diff --git a/libcore/crypto/src/main/java/javax/crypto/SecretKey.java b/libcore/crypto/src/main/java/javax/crypto/SecretKey.java index 102f8887f..ac6107443 100644 --- a/libcore/crypto/src/main/java/javax/crypto/SecretKey.java +++ b/libcore/crypto/src/main/java/javax/crypto/SecretKey.java @@ -24,21 +24,18 @@ import java.security.Key; ** This interface is a marker interface to group secret keys and to * provide type safety for. - *
+ ** Implementations of this interface have to overwrite the * {@link Object#equals(Object) equals} and {@link Object#hashCode() hashCode} * from {@link java.lang.Object} so comparison is done using the actual key data * and not the object reference. - * - * @since Android 1.0 */ public interface SecretKey extends Key { /** * The serialization version identifier. - * + * * @serial - * @since Android 1.0 */ public static final long serialVersionUID = -4795878709595146952L; } \ No newline at end of file diff --git a/libcore/crypto/src/main/java/javax/crypto/SecretKeyFactory.java b/libcore/crypto/src/main/java/javax/crypto/SecretKeyFactory.java index a420dab7a..57bca3ec7 100644 --- a/libcore/crypto/src/main/java/javax/crypto/SecretKeyFactory.java +++ b/libcore/crypto/src/main/java/javax/crypto/SecretKeyFactory.java @@ -40,9 +40,6 @@ import org.apache.harmony.security.fortress.Engine; * * Which key specifications are supported by the {@link #generateSecret} and * {@link #getKeySpec} is provider dependent. - *
- * - * @since Android 1.0 */ public class SecretKeyFactory { @@ -60,14 +57,13 @@ public class SecretKeyFactory { /** * Creates a new {@code SecretKeyFactory} - * + * * @param keyFacSpi * the SPI delegate. * @param provider * the provider providing this key factory. * @param algorithm * the algorithm name for the secret key. - * @since Android 1.0 */ protected SecretKeyFactory(SecretKeyFactorySpi keyFacSpi, Provider provider, String algorithm) { @@ -78,9 +74,8 @@ public class SecretKeyFactory { /** * Returns the name of the secret key algorithm. - * + * * @return the name of the secret key algorithm. - * @since Android 1.0 */ public final String getAlgorithm() { return algorithm; @@ -88,9 +83,8 @@ public class SecretKeyFactory { /** * Returns the provider for this {@code SecretKeyFactory} instance. - * + * * @return the provider for this {@code SecretKeyFactory} instance. - * @since Android 1.0 */ public final Provider getProvider() { return provider; @@ -99,7 +93,7 @@ public class SecretKeyFactory { /** * Creates a new {@code SecretKeyFactory} instance for the specified key * algorithm. - * + * * @param algorithm * the name of the key algorithm. * @return a secret key factory for the specified key algorithm. @@ -107,7 +101,6 @@ public class SecretKeyFactory { * if no installed provider can provide the requested algorithm. * @throws NullPointerException * if the specified algorithm is {@code null}. - * @since Android 1.0 */ public static final SecretKeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException { @@ -124,7 +117,7 @@ public class SecretKeyFactory { /** * Creates a new {@code SecretKeyFactory} instance for the specified key * algorithm from the specified {@code provider}. - * + * * @param algorithm * the name of the key algorithm. * @param provider @@ -139,7 +132,6 @@ public class SecretKeyFactory { * if the specified provider does not exist. * @throws IllegalArgumentException * if the specified provider name is {@code null} or empty. - * @since Android 1.0 */ public static final SecretKeyFactory getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, @@ -157,7 +149,7 @@ public class SecretKeyFactory { /** * Creates a new {@code SecretKeyFactory} instance for the specified key * algorithm from the specified provider. - * + * * @param algorithm * the name of the key algorithm. * @param provider @@ -171,7 +163,6 @@ public class SecretKeyFactory { * if the specified provider is {@code null}. * @throws NullPointerException * is the specified algorithm name is {@code null}. - * @since Android 1.0 */ public static final SecretKeyFactory getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { @@ -190,14 +181,13 @@ public class SecretKeyFactory { /** * Generate a secret key from the specified key specification. - * + * * @param keySpec * the key specification. * @return a secret key. * @throws InvalidKeySpecException * if the specified key specification cannot be used to generate * a secret key. - * @since Android 1.0 */ public final SecretKey generateSecret(KeySpec keySpec) throws InvalidKeySpecException { @@ -206,7 +196,7 @@ public class SecretKeyFactory { /** * Returns the key specification of the specified secret key. - * + * * @param key * the secret key to get the specification from. * @param keySpec @@ -215,7 +205,6 @@ public class SecretKeyFactory { * @throws InvalidKeySpecException * if the specified secret key cannot be transformed into the * requested key specification. - * @since Android 1.0 */ @SuppressWarnings("unchecked") public final KeySpec getKeySpec(SecretKey key, Class keySpec) @@ -226,14 +215,13 @@ public class SecretKeyFactory { /** * Translates the specified secret key into an instance of the corresponding * key from the provider of this key factory. - * + * * @param key * the secret key to translate. * @return the corresponding translated key. * @throws InvalidKeyException * if the specified key cannot be translated using this key * factory. - * @since Android 1.0 */ public final SecretKey translateKey(SecretKey key) throws InvalidKeyException { diff --git a/libcore/crypto/src/main/java/javax/crypto/SecretKeyFactorySpi.java b/libcore/crypto/src/main/java/javax/crypto/SecretKeyFactorySpi.java index f834dbb4b..5d7764ed8 100644 --- a/libcore/crypto/src/main/java/javax/crypto/SecretKeyFactorySpi.java +++ b/libcore/crypto/src/main/java/javax/crypto/SecretKeyFactorySpi.java @@ -24,35 +24,31 @@ import java.security.spec.KeySpec; /** * The Service Provider Interface (SPI) definition for the {@code * SecretKeyFactory} class. - * - * @since Android 1.0 */ public abstract class SecretKeyFactorySpi { /** * Creates a new {@code SecretKeyFactorySpi} instance. - * @since Android 1.0 */ public SecretKeyFactorySpi() { } /** * Generate a secret key from the specified key specification. - * + * * @param keySpec * the key specification. * @return a secret key. * @throws InvalidKeySpecException * if the specified key specification cannot be used to generate * a secret key. - * @since Android 1.0 */ protected abstract SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException; /** * Returns the key specification of the specified secret key. - * + * * @param key * the secret key to get the specification from. * @param keySpec @@ -61,7 +57,6 @@ public abstract class SecretKeyFactorySpi { * @throws InvalidKeySpecException * if the specified secret key cannot be transformed into the * requested key specification. - * @since Android 1.0 */ @SuppressWarnings("unchecked") protected abstract KeySpec engineGetKeySpec(SecretKey key, Class keySpec) @@ -70,14 +65,13 @@ public abstract class SecretKeyFactorySpi { /** * Translates the specified secret key into an instance of the corresponding * key from the provider of this key factory. - * + * * @param key * the secret key to translate. * @return the corresponding translated key. * @throws InvalidKeyException * if the specified key cannot be translated using this key * factory. - * @since Android 1.0 */ protected abstract SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException; diff --git a/libcore/crypto/src/main/java/javax/crypto/ShortBufferException.java b/libcore/crypto/src/main/java/javax/crypto/ShortBufferException.java index 593a31ee6..56480a852 100644 --- a/libcore/crypto/src/main/java/javax/crypto/ShortBufferException.java +++ b/libcore/crypto/src/main/java/javax/crypto/ShortBufferException.java @@ -27,8 +27,6 @@ import java.security.GeneralSecurityException; /** * The exception that is thrown when the result of an operation is attempted to * store in a user provided buffer that is too small. - * - * @since Android 1.0 */ public class ShortBufferException extends GeneralSecurityException { @@ -43,7 +41,6 @@ public class ShortBufferException extends GeneralSecurityException { * * @param msg * the exception message. - * @since Android 1.0 */ public ShortBufferException(String msg) { super(msg); @@ -51,8 +48,6 @@ public class ShortBufferException extends GeneralSecurityException { /** * Creates a new instance of {@code ShortBufferException}. - * - * @since Android 1.0 */ public ShortBufferException() { } diff --git a/libcore/crypto/src/main/java/javax/crypto/interfaces/DHKey.java b/libcore/crypto/src/main/java/javax/crypto/interfaces/DHKey.java index f686844d4..6ef17d406 100644 --- a/libcore/crypto/src/main/java/javax/crypto/interfaces/DHKey.java +++ b/libcore/crypto/src/main/java/javax/crypto/interfaces/DHKey.java @@ -21,14 +21,12 @@ import javax.crypto.spec.DHParameterSpec; /** * The interface for a Diffie-Hellman key. - * - * @since Android 1.0 */ public interface DHKey { /** * Returns the parameters for this key. - * + * * @return the parameters for this key. */ public DHParameterSpec getParams(); diff --git a/libcore/crypto/src/main/java/javax/crypto/interfaces/DHPrivateKey.java b/libcore/crypto/src/main/java/javax/crypto/interfaces/DHPrivateKey.java index d39268b81..f63e0cb5e 100644 --- a/libcore/crypto/src/main/java/javax/crypto/interfaces/DHPrivateKey.java +++ b/libcore/crypto/src/main/java/javax/crypto/interfaces/DHPrivateKey.java @@ -22,8 +22,6 @@ import java.security.PrivateKey; /** * The interface for a private key in the Diffie-Hellman key exchange protocol. - * - * @since Android 1.0 */ public interface DHPrivateKey extends DHKey, PrivateKey { diff --git a/libcore/crypto/src/main/java/javax/crypto/interfaces/DHPublicKey.java b/libcore/crypto/src/main/java/javax/crypto/interfaces/DHPublicKey.java index 75201a745..92e8f10f1 100644 --- a/libcore/crypto/src/main/java/javax/crypto/interfaces/DHPublicKey.java +++ b/libcore/crypto/src/main/java/javax/crypto/interfaces/DHPublicKey.java @@ -21,9 +21,7 @@ import java.math.BigInteger; import java.security.PublicKey; /** - * The interface for a public key in the Diffie-Hellman key exchange protocol. - * - * @since Android 1.0 + * The interface for a public key in the Diffie-Hellman key exchange protocol. */ public interface DHPublicKey extends DHKey, PublicKey { diff --git a/libcore/crypto/src/main/java/javax/crypto/interfaces/PBEKey.java b/libcore/crypto/src/main/java/javax/crypto/interfaces/PBEKey.java index 4612ad2d1..c718715e9 100644 --- a/libcore/crypto/src/main/java/javax/crypto/interfaces/PBEKey.java +++ b/libcore/crypto/src/main/java/javax/crypto/interfaces/PBEKey.java @@ -21,8 +21,6 @@ import javax.crypto.SecretKey; /** * The interface to a password-based-encryption key. - * - * @since Android 1.0 */ public interface PBEKey extends SecretKey { @@ -33,21 +31,21 @@ public interface PBEKey extends SecretKey { /** * Returns the iteration count, 0 if not specified. - * + * * @return the iteration count, 0 if not specified. */ public int getIterationCount(); /** * Returns a copy of the salt data or null if not specified. - * + * * @return a copy of the salt data or null if not specified. */ public byte[] getSalt(); /** * Returns a copy to the password. - * + * * @return a copy to the password. */ public char[] getPassword(); diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/DESKeySpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/DESKeySpec.java index 2a994d5ab..372a68d00 100644 --- a/libcore/crypto/src/main/java/javax/crypto/spec/DESKeySpec.java +++ b/libcore/crypto/src/main/java/javax/crypto/spec/DESKeySpec.java @@ -24,8 +24,6 @@ import org.apache.harmony.crypto.internal.nls.Messages; /** * The key specification for a DES key. - * - * @since Android 1.0 */ public class DESKeySpec implements KeySpec { @@ -96,7 +94,7 @@ public class DESKeySpec implements KeySpec { /** * Creates a newDESKeySpec
from the first 8 bytes of the
* specified key data.
- *
+ *
* @param key
* the key data.
* @throws InvalidKeyException
@@ -109,7 +107,7 @@ public class DESKeySpec implements KeySpec {
/**
* Creates a new DESKeySpec
from the first 8 bytes of the
* specified key data starting at offset
.
- *
+ *
* @param key
* the key data
* @param offset
@@ -133,7 +131,7 @@ public class DESKeySpec implements KeySpec {
/**
* Returns a copy of the key.
- *
+ *
* @return a copy of the key.
*/
public byte[] getKey() {
@@ -145,7 +143,7 @@ public class DESKeySpec implements KeySpec {
/**
* Returns whether the specified key data starting at offset
is
* parity-adjusted.
- *
+ *
* @param key
* the key data.
* @param offset
@@ -185,7 +183,7 @@ public class DESKeySpec implements KeySpec {
/**
* Returns whether the specified key data starting at offset
is
* weak or semi-weak.
- *
+ *
* @param key
* the key data.
* @param offset
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/DESedeKeySpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/DESedeKeySpec.java
index 186f07dcd..199eba6c0 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/DESedeKeySpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/DESedeKeySpec.java
@@ -24,8 +24,6 @@ import org.apache.harmony.crypto.internal.nls.Messages;
/**
* The key specification for a triple-DES (DES-EDE) key.
- *
- * @since Android 1.0
*/
public class DESedeKeySpec implements KeySpec {
@@ -39,7 +37,7 @@ public class DESedeKeySpec implements KeySpec {
/**
* Creates a new DESedeKeySpec
instance from the first 24 (
* {@link #DES_EDE_KEY_LEN}) bytes of the specified key data.
- *
+ *
* @param key
* the key data.
* @throws InvalidKeyException
@@ -64,7 +62,7 @@ public class DESedeKeySpec implements KeySpec {
* Creates a new DESedeKeySpec
instance from the first 24 (
* {@link #DES_EDE_KEY_LEN} ) bytes of the specified key data starting at
* offset
.
- *
+ *
* @param key
* the key data
* @param offset
@@ -90,7 +88,7 @@ public class DESedeKeySpec implements KeySpec {
/**
* Returns a copy of the key.
- *
+ *
* @return a copy of the key.
*/
public byte[] getKey() {
@@ -102,7 +100,7 @@ public class DESedeKeySpec implements KeySpec {
/**
* Returns whether the specified key data starting at offset
is
* parity-adjusted.
- *
+ *
* @param key
* the key data.
* @param offset
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/DHGenParameterSpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/DHGenParameterSpec.java
index a14931801..f6ddc035c 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/DHGenParameterSpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/DHGenParameterSpec.java
@@ -22,8 +22,6 @@ import java.security.spec.AlgorithmParameterSpec;
/**
* The algorithm parameter specification for generating Diffie-Hellman
* parameters used in Diffie-Hellman key agreement.
- *
- * @since Android 1.0
*/
public class DHGenParameterSpec implements AlgorithmParameterSpec {
@@ -33,7 +31,7 @@ public class DHGenParameterSpec implements AlgorithmParameterSpec {
/**
* Creates a new DHGenParameterSpec
instance with the specified
* parameters.
- *
+ *
* @param primeSize
* the size of the prime modulus in bits.
* @param exponentSize
@@ -46,7 +44,7 @@ public class DHGenParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the size of the prime modulus in bits.
- *
+ *
* @return the size of the prime modulus in bits.
*/
public int getPrimeSize() {
@@ -55,7 +53,7 @@ public class DHGenParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the size of the random exponent in bits.
- *
+ *
* @return the size of the random exponent in bits.
*/
public int getExponentSize() {
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/DHParameterSpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/DHParameterSpec.java
index 9bb94b515..6030b404b 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/DHParameterSpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/DHParameterSpec.java
@@ -22,8 +22,6 @@ import java.security.spec.AlgorithmParameterSpec;
/**
* The algorithm parameter specification for the Diffie-Hellman algorithm.
- *
- * @since Android 1.0
*/
public class DHParameterSpec implements AlgorithmParameterSpec {
@@ -34,7 +32,7 @@ public class DHParameterSpec implements AlgorithmParameterSpec {
/**
* Creates a new DHParameterSpec
instance with the specified
* prime modulus and base generator.
- *
+ *
* @param p
* the prime modulus.
* @param g
@@ -50,7 +48,7 @@ public class DHParameterSpec implements AlgorithmParameterSpec {
* Creates a new DHParameterSpec
instance with the specified
* prime modulus, base generator and size (in bits) of the
* random exponent.
- *
+ *
* @param p
* the prime modulus.
* @param g
@@ -66,7 +64,7 @@ public class DHParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the prime modulus of this parameter specification.
- *
+ *
* @return the prime modulus.
*/
public BigInteger getP() {
@@ -75,7 +73,7 @@ public class DHParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the base generator of this parameter specification.
- *
+ *
* @return the base generator.
*/
public BigInteger getG() {
@@ -84,7 +82,7 @@ public class DHParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the size (in bits) of the random exponent.
- *
+ *
* @return the size (in bits) of the random exponent.
*/
public int getL() {
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/DHPrivateKeySpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/DHPrivateKeySpec.java
index 6652de86f..925a00378 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/DHPrivateKeySpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/DHPrivateKeySpec.java
@@ -22,8 +22,6 @@ import java.security.spec.KeySpec;
/**
* The key specification for a Diffie-Hellman private key.
- *
- * @since Android 1.0
*/
public class DHPrivateKeySpec implements KeySpec {
@@ -35,7 +33,7 @@ public class DHPrivateKeySpec implements KeySpec {
* Creates a new DHPrivateKeySpec
with the specified private
* value x
. prime modulus p
and base
* generator g
.
- *
+ *
* @param x
* the private value.
* @param p
@@ -51,7 +49,7 @@ public class DHPrivateKeySpec implements KeySpec {
/**
* Returns the private value x
.
- *
+ *
* @return the private value x
.
*/
public BigInteger getX() {
@@ -60,7 +58,7 @@ public class DHPrivateKeySpec implements KeySpec {
/**
* Returns the prime modulus p
.
- *
+ *
* @return the prime modulus p
.
*/
public BigInteger getP() {
@@ -69,10 +67,11 @@ public class DHPrivateKeySpec implements KeySpec {
/**
* Returns the base generator g
.
- *
+ *
* @return the base generator g
.
*/
public BigInteger getG() {
return g;
}
}
+
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/DHPublicKeySpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/DHPublicKeySpec.java
index 68d3267f7..a5d4461a9 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/DHPublicKeySpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/DHPublicKeySpec.java
@@ -22,8 +22,6 @@ import java.security.spec.KeySpec;
/**
* The key specification for a Diffie-Hellman public key.
- *
- * @since Android 1.0
*/
public class DHPublicKeySpec implements KeySpec {
@@ -35,7 +33,7 @@ public class DHPublicKeySpec implements KeySpec {
* Creates a new DHPublicKeySpec
instance with the specified
* public value y
, the prime modulus
* p
and the base generator g
.
- *
+ *
* @param y
* the public value.
* @param p
@@ -51,7 +49,7 @@ public class DHPublicKeySpec implements KeySpec {
/**
* Returns the public value y
.
- *
+ *
* @return the public value y
.
*/
public BigInteger getY() {
@@ -60,7 +58,7 @@ public class DHPublicKeySpec implements KeySpec {
/**
* Returns the prime modulus p
.
- *
+ *
* @return the prime modulus p
.
*/
public BigInteger getP() {
@@ -69,7 +67,7 @@ public class DHPublicKeySpec implements KeySpec {
/**
* Returns the base generator g
;
- *
+ *
* @return the base generator g
;
*/
public BigInteger getG() {
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/IvParameterSpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/IvParameterSpec.java
index 2f532a816..ce7f9d3c4 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/IvParameterSpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/IvParameterSpec.java
@@ -35,7 +35,7 @@ public class IvParameterSpec implements AlgorithmParameterSpec {
/**
* Creates a new IvParameterSpec
instance with the bytes from
* the specified buffer iv used as initialization vector.
- *
+ *
* @param iv
* the buffer used as initialization vector.
* @throws NullPointerException
@@ -53,7 +53,7 @@ public class IvParameterSpec implements AlgorithmParameterSpec {
* Creates a new IvParameterSpec
instance with len
* bytes from the specified buffer iv
starting at
* offset
.
- *
+ *
* @param iv
* the buffer used as initialization vector.
* @param offset
@@ -81,7 +81,7 @@ public class IvParameterSpec implements AlgorithmParameterSpec {
/**
* Returns a copy of the initialization vector data.
- *
+ *
* @return a copy of the initialization vector data.
*/
public byte[] getIV() {
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/OAEPParameterSpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/OAEPParameterSpec.java
index ebb6cce14..29b572d8d 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/OAEPParameterSpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/OAEPParameterSpec.java
@@ -26,8 +26,6 @@ import javax.crypto.spec.PSource;
*
* This padding algorithm is defined in the PKCS #1 standard.
- *
- * @since Android 1.0
*/
public class OAEPParameterSpec implements AlgorithmParameterSpec {
@@ -60,7 +58,7 @@ public class OAEPParameterSpec implements AlgorithmParameterSpec {
* message digest algorithm name, mask generation function
* (mgf) algorithm name, parameters for the mgf
* algorithm and the source of the label L
.
- *
+ *
* @param mdName
* the message digest algorithm name.
* @param mgfName
@@ -87,7 +85,7 @@ public class OAEPParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the algorithm name of the message digest.
- *
+ *
* @return the algorithm name of the message digest.
*/
public String getDigestAlgorithm() {
@@ -96,7 +94,7 @@ public class OAEPParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the algorithm name of the mask generation function.
- *
+ *
* @return the algorithm name of the mask generation function.
*/
public String getMGFAlgorithm() {
@@ -106,7 +104,7 @@ public class OAEPParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the algorithm parameter specification for the mask generation
* function algorithm.
- *
+ *
* @return the algorithm parameter specification for the mask generation
* function algorithm.
*/
@@ -116,7 +114,7 @@ public class OAEPParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the source of the label L
.
- *
+ *
* @return the source of the label L
.
*/
public PSource getPSource() {
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/PBEKeySpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/PBEKeySpec.java
index c46617e0a..d79fd3c63 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/PBEKeySpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/PBEKeySpec.java
@@ -27,8 +27,6 @@ import org.apache.harmony.crypto.internal.nls.Messages;
*
* Password based encryption is described in PKCS #5.
- *
- * @since Android 1.0
*/
public class PBEKeySpec implements KeySpec {
@@ -39,7 +37,7 @@ public class PBEKeySpec implements KeySpec {
/**
* Creates a new PBEKeySpec
with the specified password.
- *
+ *
* @param password
* the password.
*/
@@ -58,7 +56,7 @@ public class PBEKeySpec implements KeySpec {
/**
* Creates a new PBEKeySpec
with the specified password, salt,
* iteration count and the desired length of the derived key.
- *
+ *
* @param password
* the password.
* @param salt
@@ -104,7 +102,7 @@ public class PBEKeySpec implements KeySpec {
/**
* Creates a new PBEKeySpec
with the specified password, salt
* and iteration count.
- *
+ *
* @param password
* the password.
* @param salt
@@ -150,7 +148,7 @@ public class PBEKeySpec implements KeySpec {
/**
* Returns a copy of the password of this key specification.
- *
+ *
* @return a copy of the password of this key specification.
* @throws IllegalStateException
* if the password has been cleared before.
@@ -166,7 +164,7 @@ public class PBEKeySpec implements KeySpec {
/**
* Returns a copy of the salt of this key specification.
- *
+ *
* @return a copy of the salt of this key specification or null if none is
* specified.
*/
@@ -181,7 +179,7 @@ public class PBEKeySpec implements KeySpec {
/**
* Returns the iteration count of this key specification.
- *
+ *
* @return the iteration count of this key specification.
*/
public final int getIterationCount() {
@@ -190,7 +188,7 @@ public class PBEKeySpec implements KeySpec {
/**
* Returns the desired key length of the derived key.
- *
+ *
* @return the desired key length of the derived key.
*/
public final int getKeyLength() {
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/PBEParameterSpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/PBEParameterSpec.java
index 190986eff..cce3832ce 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/PBEParameterSpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/PBEParameterSpec.java
@@ -23,12 +23,10 @@ import org.apache.harmony.crypto.internal.nls.Messages;
/**
* The algorithm parameter specification for a password based encryption
- * algorithm.
+ * algorithm.
*
* Password based encryption is described in PKCS #5.
- *
- * @since Android 1.0
*
*/
public class PBEParameterSpec implements AlgorithmParameterSpec {
@@ -39,7 +37,7 @@ public class PBEParameterSpec implements AlgorithmParameterSpec {
/**
* Creates a new PBEParameterSpec
with the specified salt and
* iteration count.
- *
+ *
* @param salt
* the salt.
* @param iterationCount
@@ -58,7 +56,7 @@ public class PBEParameterSpec implements AlgorithmParameterSpec {
/**
* Returns a copy to the salt.
- *
+ *
* @return a copy to the salt.
*/
public byte[] getSalt() {
@@ -69,7 +67,7 @@ public class PBEParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the iteration count.
- *
+ *
* @return the iteration count.
*/
public int getIterationCount() {
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/PSource.java b/libcore/crypto/src/main/java/javax/crypto/spec/PSource.java
index d5bdf1b15..30fd8af49 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/PSource.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/PSource.java
@@ -22,8 +22,6 @@ import org.apache.harmony.crypto.internal.nls.Messages;
/**
* The source of the label L
as specified in PKCS #1.
- *
- * @since Android 1.0
*/
public class PSource {
@@ -34,7 +32,7 @@ public class PSource {
/**
* Creates a new PSource
instance with the specified source
* algorithm identifier.
- *
+ *
* @param pSrcName
* the source algorithm identifier.
* @throws NullPointerException
@@ -49,7 +47,7 @@ public class PSource {
/**
* Returns the source algorithm identifier.
- *
+ *
* @return the source algorithm identifier.
*/
public String getAlgorithm() {
@@ -59,15 +57,14 @@ public class PSource {
/**
* The explicit specification of the parameter P
used in the
* source algorithm.
- *
- * @since Android 1.0
*/
public static final class PSpecified extends PSource {
private final byte[] p;
/**
- * The instance of PSpecified
with the default value byte[0]
for P
+ * The instance of PSpecified
with the default value
+ * byte[0]
for P
*/
public static final PSpecified DEFAULT = new PSpecified();
@@ -79,7 +76,7 @@ public class PSource {
/**
* Creates a new instance of PSpecified
with the specified
* parameter P
.
- *
+ *
* @param p
* the parameter P
.
* @throws NullPointerException
@@ -98,7 +95,7 @@ public class PSource {
/**
* Returns a copy of the value of the parameter P
.
- *
+ *
* @return a copy of the value of the parameter P
*/
public byte[] getValue() {
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/RC2ParameterSpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/RC2ParameterSpec.java
index bd76cf45d..bc7a39cab 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/RC2ParameterSpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/RC2ParameterSpec.java
@@ -25,8 +25,6 @@ import org.apache.harmony.crypto.internal.nls.Messages;
/**
* The algorithm parameter specification for the RC2 algorithm.
- *
- * @since Android 1.0
*/
public class RC2ParameterSpec implements AlgorithmParameterSpec {
@@ -36,7 +34,7 @@ public class RC2ParameterSpec implements AlgorithmParameterSpec {
/**
* Creates a new RC2ParameterSpec
instance with the specified
* effective key length (in bits),
- *
+ *
* @param effectiveKeyBits
* the effective key length (in bits).
*/
@@ -51,7 +49,7 @@ public class RC2ParameterSpec implements AlgorithmParameterSpec {
*
* The size of the initialization vector must be at least 8 bytes
* which are copied to protect them against modification.
- *
+ *
* @param effectiveKeyBits
* the effective key length (in bits).
* @param iv
@@ -78,7 +76,7 @@ public class RC2ParameterSpec implements AlgorithmParameterSpec {
* The size of the initialization vector starting at
* offset
must be at least 8 bytes which are copied to protect
* them against modification.
- *
+ *
* @param effectiveKeyBits
* the effective key length (in bits).
* @param iv
@@ -103,7 +101,7 @@ public class RC2ParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the effective key length (in bits).
- *
+ *
* @return the effective key length (in bits).
*/
public int getEffectiveKeyBits() {
@@ -112,7 +110,7 @@ public class RC2ParameterSpec implements AlgorithmParameterSpec {
/**
* Returns a copy of the initialization vector.
- *
+ *
* @return a copy of the initialization vector, or null if none specified.
*/
public byte[] getIV() {
@@ -127,7 +125,7 @@ public class RC2ParameterSpec implements AlgorithmParameterSpec {
/**
* Compares the specified object to this RC2ParameterSpec
* instance.
- *
+ *
* @param obj
* the object to compare.
* @return true if the effective key length and the initialization vector of
@@ -148,7 +146,7 @@ public class RC2ParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the hash code of this RC2ParameterSpec
instance.
- *
+ *
* @return the hash code.
*/
@Override
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/RC5ParameterSpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/RC5ParameterSpec.java
index f711f41cd..57010f7d5 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/RC5ParameterSpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/RC5ParameterSpec.java
@@ -25,8 +25,6 @@ import org.apache.harmony.crypto.internal.nls.Messages;
/**
* The algorithm parameter specification for the RC5 algorithm.
- *
- * @since Android 1.0
*/
public class RC5ParameterSpec implements AlgorithmParameterSpec {
@@ -38,7 +36,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
/**
* Creates a new RC5ParameterSpec
instance with the specified
* version, round count an word size (in bits).
- *
+ *
* @param version
* the version.
* @param rounds
@@ -61,7 +59,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
* The size of the initialization vector must be at least
* 2 * (wordSize / 8)
bytes which are copied to protect them
* against modification.
- *
+ *
* @param version
* the version.
* @param rounds
@@ -97,7 +95,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
* The size of the initialization vector must be at least
* offset + (2 * (wordSize / 8))
bytes. The bytes starting at
* offset
are copied to protect them against modification.
- *
+ *
* @param version
* the version.
* @param rounds
@@ -135,7 +133,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the version.
- *
+ *
* @return the version.
*/
public int getVersion() {
@@ -144,7 +142,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the round count.
- *
+ *
* @return the round count.
*/
public int getRounds() {
@@ -153,7 +151,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the word size (in bits).
- *
+ *
* @return the word size (in bits).
*/
public int getWordSize() {
@@ -162,7 +160,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
/**
* Returns a copy of the initialization vector.
- *
+ *
* @return a copy of the initialization vector, or null if none specified.
*/
public byte[] getIV() {
@@ -177,7 +175,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
/**
* Compares the specified object with this RC5ParameterSpec
* instance.
- *
+ *
* @param obj
* the object to compare.
* @return true if version, round count, word size and initializaion vector
@@ -200,7 +198,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
/**
* Returns the hash code of this RC5ParameterSpec
instance.
- *
+ *
* @return the hash code.
*/
@Override
diff --git a/libcore/crypto/src/main/java/javax/crypto/spec/SecretKeySpec.java b/libcore/crypto/src/main/java/javax/crypto/spec/SecretKeySpec.java
index 897948c3c..d1eba47cd 100644
--- a/libcore/crypto/src/main/java/javax/crypto/spec/SecretKeySpec.java
+++ b/libcore/crypto/src/main/java/javax/crypto/spec/SecretKeySpec.java
@@ -33,8 +33,6 @@ import org.apache.harmony.crypto.internal.nls.Messages;
* A key specification for a SecretKey
and also a secret key
* implementation that is provider-independent. It can be used for raw secret
* keys that can be specified as byte[]
.
- *
- * @since Android 1.0
*/
public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
@@ -50,7 +48,7 @@ public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
/**
* Creates a new SecretKeySpec
for the specified key data and
* algorithm name.
- *
+ *
* @param key
* the key data.
* @param algorithm
@@ -79,7 +77,7 @@ public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
* Creates a new SecretKeySpec
for the key data from the
* specified buffer key
starting at offset
with
* length len
and the specified algorithm
name.
- *
+ *
* @param key
* the key data.
* @param offset
@@ -120,7 +118,7 @@ public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
/**
* Returns the algorithm name.
- *
+ *
* @return the algorithm name.
*/
public String getAlgorithm() {
@@ -129,7 +127,7 @@ public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
/**
* Returns the name of the format used to encode the key.
- *
+ *
* @return the format name "RAW".
*/
public String getFormat() {
@@ -138,7 +136,7 @@ public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
/**
* Returns the encoded form of this secret key.
- *
+ *
* @return the encoded form of this secret key.
*/
public byte[] getEncoded() {
@@ -149,7 +147,7 @@ public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
/**
* Returns the hash code of this SecretKeySpec
object.
- *
+ *
* @return the hash code.
*/
@Override
@@ -164,7 +162,7 @@ public class SecretKeySpec implements SecretKey, KeySpec, Serializable {
/**
* Compares the specified object with this SecretKeySpec
* instance.
- *
+ *
* @param obj
* the object to compare.
* @return true if the algorithm name and key of both object are equal,
--
2.11.0