mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8284851: Update javax.crypto files to use proper javadoc for mentioned classes
Reviewed-by: weijun, valeriep
This commit is contained in:
parent
8cdead0c94
commit
f804f2ce8e
92 changed files with 2142 additions and 2010 deletions
|
@ -228,8 +228,8 @@ public abstract class CipherSpi {
|
|||
*
|
||||
* @param mode the cipher mode
|
||||
*
|
||||
* @throws NoSuchAlgorithmException if the requested cipher mode does
|
||||
* not exist
|
||||
* @throws NoSuchAlgorithmException if the requested cipher mode
|
||||
* does not exist
|
||||
*/
|
||||
protected abstract void engineSetMode(String mode)
|
||||
throws NoSuchAlgorithmException;
|
||||
|
@ -298,10 +298,11 @@ public abstract class CipherSpi {
|
|||
protected abstract AlgorithmParameters engineGetParameters();
|
||||
|
||||
/**
|
||||
* Initializes this cipher with a key and a source
|
||||
* Initializes this {@code CipherSpi} object with a key and a source
|
||||
* of randomness.
|
||||
*
|
||||
* <p>The cipher is initialized for one of the following four operations:
|
||||
* <p>The {@code CipherSpi} object is initialized for one of the
|
||||
* following four operations:
|
||||
* encryption, decryption, key wrapping or key unwrapping, depending on
|
||||
* the value of {@code opmode}.
|
||||
*
|
||||
|
@ -325,13 +326,13 @@ public abstract class CipherSpi {
|
|||
* requires any random bytes (e.g., for parameter generation), it will get
|
||||
* them from {@code random}.
|
||||
*
|
||||
* <p>Note that when a {@code Cipher} object is initialized, it loses all
|
||||
* previously-acquired state. In other words, initializing a cipher is
|
||||
* equivalent to creating a new instance of that cipher and initializing
|
||||
* it.
|
||||
* <p>Note that when a {@code CipherSpi} object is initialized, it loses all
|
||||
* previously-acquired state. In other words, initializing a
|
||||
* {@code CipherSpi} object is equivalent to creating a new instance
|
||||
* of that {@code CipherSpi} object and initializing it.
|
||||
*
|
||||
* @param opmode the operation mode of this cipher (this is one of
|
||||
* the following:
|
||||
* @param opmode the operation mode of this {@code CipherSpi} object
|
||||
* (this is one of the following:
|
||||
* {@code ENCRYPT_MODE}, {@code DECRYPT_MODE},
|
||||
* {@code WRAP_MODE} or {@code UNWRAP_MODE})
|
||||
* @param key the encryption key
|
||||
|
@ -350,10 +351,11 @@ public abstract class CipherSpi {
|
|||
throws InvalidKeyException;
|
||||
|
||||
/**
|
||||
* Initializes this cipher with a key, a set of
|
||||
* Initializes this {@code CipherSpi} object with a key, a set of
|
||||
* algorithm parameters, and a source of randomness.
|
||||
*
|
||||
* <p>The cipher is initialized for one of the following four operations:
|
||||
* <p>The {@code CipherSpi} object is initialized for one of the
|
||||
* following four operations:
|
||||
* encryption, decryption, key wrapping or key unwrapping, depending on
|
||||
* the value of {@code opmode}.
|
||||
*
|
||||
|
@ -377,15 +379,15 @@ public abstract class CipherSpi {
|
|||
* requires any random bytes (e.g., for parameter generation), it will get
|
||||
* them from {@code random}.
|
||||
*
|
||||
* <p>Note that when a {@code Cipher} object is initialized, it loses all
|
||||
* previously-acquired state. In other words, initializing a cipher is
|
||||
* equivalent to creating a new instance of that Cipher and initializing
|
||||
* it.
|
||||
* <p>Note that when a {@code CipherSpi} object is initialized, it loses all
|
||||
* previously-acquired state. In other words, initializing a
|
||||
* {@code CipherSpi} object is equivalent to creating a new instance of that
|
||||
* {@code CipherSpi} object and initializing it.
|
||||
*
|
||||
* @param opmode the operation mode of this cipher (this is one of
|
||||
* the following:
|
||||
* @param opmode the operation mode of this {@code CipherSpi} object
|
||||
* (this is one of the following:
|
||||
* {@code ENCRYPT_MODE}, {@code DECRYPT_MODE},
|
||||
* {@code WRAP_MODE}> or {@code UNWRAP_MODE})
|
||||
* {@code WRAP_MODE}, or {@code UNWRAP_MODE})
|
||||
* @param key the encryption key
|
||||
* @param params the algorithm parameters
|
||||
* @param random the source of randomness
|
||||
|
@ -406,10 +408,11 @@ public abstract class CipherSpi {
|
|||
throws InvalidKeyException, InvalidAlgorithmParameterException;
|
||||
|
||||
/**
|
||||
* Initializes this cipher with a key, a set of
|
||||
* Initializes this {@code CipherSpi} object with a key, a set of
|
||||
* algorithm parameters, and a source of randomness.
|
||||
*
|
||||
* <p>The cipher is initialized for one of the following four operations:
|
||||
* <p>The {@code CipherSpi} object is initialized for one of the
|
||||
* following four operations:
|
||||
* encryption, decryption, key wrapping or key unwrapping, depending on
|
||||
* the value of {@code opmode}.
|
||||
*
|
||||
|
@ -433,15 +436,15 @@ public abstract class CipherSpi {
|
|||
* requires any random bytes (e.g., for parameter generation), it will get
|
||||
* them from {@code random}.
|
||||
*
|
||||
* <p>Note that when a {@code Cipher} object is initialized, it loses all
|
||||
* previously-acquired state. In other words, initializing a cipher is
|
||||
* equivalent to creating a new instance of that cipher and initializing
|
||||
* it.
|
||||
* <p>Note that when a {@code CipherSpi} object is initialized, it loses all
|
||||
* previously-acquired state. In other words, initializing a
|
||||
* {@code CipherSpi} object is equivalent to creating a new instance of that
|
||||
* {@code CipherSpi} object and initializing it.
|
||||
*
|
||||
* @param opmode the operation mode of this cipher (this is one of
|
||||
* the following:
|
||||
* @param opmode the operation mode of this {@code CipherSpi} object
|
||||
* (this is one of the following:
|
||||
* {@code ENCRYPT_MODE}, {@code DECRYPT_MODE},
|
||||
* {@code WRAP_MODE} or {@code UNWRAP_MODE})
|
||||
* {@code WRAP_MODE}, or {@code UNWRAP_MODE})
|
||||
* @param key the encryption key
|
||||
* @param params the algorithm parameters
|
||||
* @param random the source of randomness
|
||||
|
@ -463,8 +466,8 @@ public abstract class CipherSpi {
|
|||
|
||||
/**
|
||||
* Continues a multiple-part encryption or decryption operation
|
||||
* (depending on how this cipher was initialized), processing another data
|
||||
* part.
|
||||
* (depending on how this {@code CipherSpi} object was initialized),
|
||||
* processing another data part.
|
||||
*
|
||||
* <p>The first {@code inputLen} bytes in the {@code input}
|
||||
* buffer, starting at {@code inputOffset} inclusive, are processed,
|
||||
|
@ -483,8 +486,8 @@ public abstract class CipherSpi {
|
|||
|
||||
/**
|
||||
* Continues a multiple-part encryption or decryption operation
|
||||
* (depending on how this cipher was initialized), processing another data
|
||||
* part.
|
||||
* (depending on how this {@code CipherSpi} object was initialized),
|
||||
* processing another data part.
|
||||
*
|
||||
* <p>The first {@code inputLen} bytes in the {@code input}
|
||||
* buffer, starting at {@code inputOffset} inclusive, are processed,
|
||||
|
@ -514,8 +517,8 @@ public abstract class CipherSpi {
|
|||
|
||||
/**
|
||||
* Continues a multiple-part encryption or decryption operation
|
||||
* (depending on how this cipher was initialized), processing another data
|
||||
* part.
|
||||
* (depending on how this {@code CipherSpi} object was initialized),
|
||||
* processing another data part.
|
||||
*
|
||||
* <p>All {@code input.remaining()} bytes starting at
|
||||
* {@code input.position()} are processed. The result is stored
|
||||
|
@ -555,8 +558,8 @@ public abstract class CipherSpi {
|
|||
/**
|
||||
* Encrypts or decrypts data in a single-part operation,
|
||||
* or finishes a multiple-part operation.
|
||||
* The data is encrypted or decrypted, depending on how this cipher was
|
||||
* initialized.
|
||||
* The data is encrypted or decrypted, depending on how this
|
||||
* {@code CipherSpi} object was initialized.
|
||||
*
|
||||
* <p>The first {@code inputLen} bytes in the {@code input}
|
||||
* buffer, starting at {@code inputOffset} inclusive, and any input
|
||||
|
@ -567,15 +570,15 @@ public abstract class CipherSpi {
|
|||
* case of decryption.
|
||||
* The result is stored in a new buffer.
|
||||
*
|
||||
* <p>Upon finishing, this method resets this cipher to the state
|
||||
* it was in when previously initialized via a call to
|
||||
* <p>Upon finishing, this method resets this {@code CipherSpi} object
|
||||
* to the state it was in when previously initialized via a call to
|
||||
* {@code engineInit}.
|
||||
* That is, the object is reset and available to encrypt or decrypt
|
||||
* (depending on the operation mode that was specified in the call to
|
||||
* {@code engineInit}) more data.
|
||||
*
|
||||
* <p>Note: if any exception is thrown, this cipher may need to
|
||||
* be reset before it can be used again.
|
||||
* <p>Note: if any exception is thrown, this {@code CipherSpi} object
|
||||
* may need to be reset before it can be used again.
|
||||
*
|
||||
* @param input the input buffer
|
||||
* @param inputOffset the offset in {@code input} where the input starts
|
||||
|
@ -588,12 +591,12 @@ public abstract class CipherSpi {
|
|||
* input length of the data processed by this cipher is not a multiple of
|
||||
* block size; or if this encryption algorithm is unable to
|
||||
* process the input data provided
|
||||
* @throws BadPaddingException if this cipher is in decryption mode,
|
||||
* and (un)padding has been requested, but the decrypted data is not
|
||||
* bounded by the appropriate padding bytes
|
||||
* @throws AEADBadTagException if this cipher is decrypting in an
|
||||
* AEAD mode (such as GCM or CCM), and the received authentication tag
|
||||
* does not match the calculated value
|
||||
* @throws BadPaddingException if this {@code CipherSpi} object is in
|
||||
* decryption mode, and (un)padding has been requested, but the decrypted
|
||||
* data is not bounded by the appropriate padding bytes
|
||||
* @throws AEADBadTagException if this {@code CipherSpi} object is
|
||||
* decrypting in an AEAD mode (such as GCM or CCM), and the received
|
||||
* authentication tag does not match the calculated value
|
||||
*/
|
||||
protected abstract byte[] engineDoFinal(byte[] input, int inputOffset,
|
||||
int inputLen)
|
||||
|
@ -602,8 +605,8 @@ public abstract class CipherSpi {
|
|||
/**
|
||||
* Encrypts or decrypts data in a single-part operation,
|
||||
* or finishes a multiple-part operation.
|
||||
* The data is encrypted or decrypted, depending on how this cipher was
|
||||
* initialized.
|
||||
* The data is encrypted or decrypted, depending on how this
|
||||
* {@code CipherSpi} object was initialized.
|
||||
*
|
||||
* <p>The first {@code inputLen} bytes in the {@code input}
|
||||
* buffer, starting at {@code inputOffset} inclusive, and any input
|
||||
|
@ -618,15 +621,15 @@ public abstract class CipherSpi {
|
|||
* <p>If the {@code output} buffer is too small to hold the result,
|
||||
* a {@code ShortBufferException} is thrown.
|
||||
*
|
||||
* <p>Upon finishing, this method resets this cipher to the state
|
||||
* it was in when previously initialized via a call to
|
||||
* <p>Upon finishing, this method resets this {@code CipherSpi} object
|
||||
* to the state it was in when previously initialized via a call to
|
||||
* {@code engineInit}.
|
||||
* That is, the object is reset and available to encrypt or decrypt
|
||||
* (depending on the operation mode that was specified in the call to
|
||||
* {@code engineInit}) more data.
|
||||
*
|
||||
* <p>Note: if any exception is thrown, this cipher may need to
|
||||
* be reset before it can be used again.
|
||||
* <p>Note: if any exception is thrown, this {@code CipherSpi} object
|
||||
* may need to be reset before it can be used again.
|
||||
*
|
||||
* @param input the input buffer
|
||||
* @param inputOffset the offset in {@code input} where the input
|
||||
|
@ -645,12 +648,13 @@ public abstract class CipherSpi {
|
|||
* process the input data provided
|
||||
* @throws ShortBufferException if the given output buffer is too small
|
||||
* to hold the result
|
||||
* @throws BadPaddingException if this cipher is in decryption mode,
|
||||
* @throws BadPaddingException if this {@code CipherSpi} object is in
|
||||
* decryption mode,
|
||||
* and (un)padding has been requested, but the decrypted data is not
|
||||
* bounded by the appropriate padding bytes
|
||||
* @throws AEADBadTagException if this cipher is decrypting in an
|
||||
* AEAD mode (such as GCM or CCM), and the received authentication tag
|
||||
* does not match the calculated value
|
||||
* @throws AEADBadTagException if this {@code CipherSpi} object is
|
||||
* decrypting in an AEAD mode (such as GCM or CCM), and the received
|
||||
* authentication tag does not match the calculated value
|
||||
*/
|
||||
protected abstract int engineDoFinal(byte[] input, int inputOffset,
|
||||
int inputLen, byte[] output,
|
||||
|
@ -661,8 +665,8 @@ public abstract class CipherSpi {
|
|||
/**
|
||||
* Encrypts or decrypts data in a single-part operation,
|
||||
* or finishes a multiple-part operation.
|
||||
* The data is encrypted or decrypted, depending on how this cipher was
|
||||
* initialized.
|
||||
* The data is encrypted or decrypted, depending on how this
|
||||
* {@code CipherSpi} object was initialized.
|
||||
*
|
||||
* <p>All {@code input.remaining()} bytes starting at
|
||||
* {@code input.position()} are processed.
|
||||
|
@ -678,15 +682,15 @@ public abstract class CipherSpi {
|
|||
* <p>If {@code output.remaining()} bytes are insufficient to
|
||||
* hold the result, a {@code ShortBufferException} is thrown.
|
||||
*
|
||||
* <p>Upon finishing, this method resets this cipher to the state
|
||||
* it was in when previously initialized via a call to
|
||||
* <p>Upon finishing, this method resets this {@code CipherSpi} object
|
||||
* to the state it was in when previously initialized via a call to
|
||||
* {@code engineInit}.
|
||||
* That is, the object is reset and available to encrypt or decrypt
|
||||
* (depending on the operation mode that was specified in the call to
|
||||
* {@code engineInit} more data.
|
||||
*
|
||||
* <p>Note: if any exception is thrown, this cipher may need to
|
||||
* be reset before it can be used again.
|
||||
* <p>Note: if any exception is thrown, this {@code CipherSpi} object
|
||||
* may need to be reset before it can be used again.
|
||||
*
|
||||
* <p>Subclasses should consider overriding this method if they can
|
||||
* process ByteBuffers more efficiently than byte arrays.
|
||||
|
@ -703,12 +707,12 @@ public abstract class CipherSpi {
|
|||
* process the input data provided
|
||||
* @throws ShortBufferException if there is insufficient space in the
|
||||
* output buffer
|
||||
* @throws BadPaddingException if this cipher is in decryption mode,
|
||||
* and (un)padding has been requested, but the decrypted data is not
|
||||
* bounded by the appropriate padding bytes
|
||||
* @throws AEADBadTagException if this cipher is decrypting in an
|
||||
* AEAD mode (such as GCM or CCM), and the received authentication tag
|
||||
* does not match the calculated value
|
||||
* @throws BadPaddingException if this {@code CipherSpi} object is in
|
||||
* decryption mode, and (un)padding has been requested, but the decrypted
|
||||
* data is not bounded by the appropriate padding bytes
|
||||
* @throws AEADBadTagException if this {@code CipherSpi} object is
|
||||
* decrypting in an AEAD mode (such as GCM or CCM), and the received
|
||||
* authentication tag does not match the calculated value
|
||||
*
|
||||
* @throws NullPointerException if either parameter is {@code null}
|
||||
* @since 1.5
|
||||
|
@ -935,10 +939,10 @@ public abstract class CipherSpi {
|
|||
* @param offset the offset in {@code src} where the AAD input starts
|
||||
* @param len the number of AAD bytes
|
||||
*
|
||||
* @throws IllegalStateException if this cipher is in a wrong state
|
||||
* (e.g., has not been initialized), does not accept AAD, or if
|
||||
* operating in either GCM or CCM mode and one of the {@code update}
|
||||
* methods has already been called for the active
|
||||
* @throws IllegalStateException if this {@code CipherSpi} object is in
|
||||
* a wrong state (e.g., has not been initialized), does not accept AAD,
|
||||
* or if operating in either GCM or CCM mode and one of the
|
||||
* {@code update} methods has already been called for the active
|
||||
* encryption/decryption operation
|
||||
* @throws UnsupportedOperationException if this method
|
||||
* has not been overridden by an implementation
|
||||
|
@ -968,10 +972,10 @@ public abstract class CipherSpi {
|
|||
*
|
||||
* @param src the buffer containing the AAD
|
||||
*
|
||||
* @throws IllegalStateException if this cipher is in a wrong state
|
||||
* (e.g., has not been initialized), does not accept AAD, or if
|
||||
* operating in either GCM or CCM mode and one of the {@code update}
|
||||
* methods has already been called for the active
|
||||
* @throws IllegalStateException if this {@code CipherSpi} object is in
|
||||
* a wrong state (e.g., has not been initialized), does not accept AAD,
|
||||
* or if operating in either GCM or CCM mode and one of the
|
||||
* {@code update} methods has already been called for the active
|
||||
* encryption/decryption operation
|
||||
* @throws UnsupportedOperationException if this method
|
||||
* has not been overridden by an implementation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue