mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8267068: Incomplete @throws javadoc for various javax.crypto.spec classes
Reviewed-by: valeriep, jnimeh
This commit is contained in:
parent
08bc59da9b
commit
5023971640
4 changed files with 32 additions and 30 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -47,30 +47,30 @@ public class IvParameterSpec implements AlgorithmParameterSpec {
|
|||
*
|
||||
* @param iv the buffer with the IV. The contents of the
|
||||
* buffer are copied to protect against subsequent modification.
|
||||
* @throws NullPointerException if <code>iv</code> is <code>null</code>
|
||||
* @throws NullPointerException if {@code iv} is {@code null}
|
||||
*/
|
||||
public IvParameterSpec(byte[] iv) {
|
||||
this(iv, 0, iv.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an IvParameterSpec object using the first <code>len</code>
|
||||
* bytes in <code>iv</code>, beginning at <code>offset</code>
|
||||
* Creates an IvParameterSpec object using the first {@code len}
|
||||
* bytes in {@code iv}, beginning at {@code offset}
|
||||
* inclusive, as the IV.
|
||||
*
|
||||
* <p> The bytes that constitute the IV are those between
|
||||
* <code>iv[offset]</code> and <code>iv[offset+len-1]</code> inclusive.
|
||||
* {@code iv[offset]} and {@code iv[offset+len-1]} inclusive.
|
||||
*
|
||||
* @param iv the buffer with the IV. The first <code>len</code>
|
||||
* bytes of the buffer beginning at <code>offset</code> inclusive
|
||||
* @param iv the buffer with the IV. The first {@code len}
|
||||
* bytes of the buffer beginning at {@code offset} inclusive
|
||||
* are copied to protect against subsequent modification.
|
||||
* @param offset the offset in <code>iv</code> where the IV
|
||||
* @param offset the offset in {@code iv} where the IV
|
||||
* starts.
|
||||
* @param len the number of IV bytes.
|
||||
* @throws IllegalArgumentException if <code>iv</code> is <code>null</code>
|
||||
* @throws IllegalArgumentException if {@code iv} is {@code null}
|
||||
* or {@code (iv.length - offset < len)}
|
||||
* @throws ArrayIndexOutOfBoundsException is thrown if <code>offset</code>
|
||||
* or <code>len</code> index bytes outside the <code>iv</code>.
|
||||
* @throws ArrayIndexOutOfBoundsException if {@code offset}
|
||||
* or {@code len} are negative.
|
||||
*/
|
||||
public IvParameterSpec(byte[] iv, int offset, int len) {
|
||||
if (iv == null) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -91,7 +91,10 @@ public class RC2ParameterSpec implements AlgorithmParameterSpec {
|
|||
* are copied to protect against subsequent modification.
|
||||
* @param offset the offset in {@code iv} where the 8-byte IV
|
||||
* starts.
|
||||
* @exception IllegalArgumentException if {@code iv} is null.
|
||||
* @exception IllegalArgumentException if {@code iv} is {@code null}
|
||||
* or {@code iv.length - offset < 8}.
|
||||
* @exception ArrayIndexOutOfBoundsException if
|
||||
* {@code offset} is negative.
|
||||
*/
|
||||
public RC2ParameterSpec(int effectiveKeyBits, byte[] iv, int offset) {
|
||||
this.effectiveKeyBits = effectiveKeyBits;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -106,9 +106,9 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
|
|||
* bytes of the buffer beginning at {@code offset}
|
||||
* inclusive are copied to protect against subsequent modification.
|
||||
* @param offset the offset in {@code iv} where the IV starts.
|
||||
* @exception IllegalArgumentException if {@code iv} is
|
||||
* {@code null} or
|
||||
* {@code (iv.length - offset < 2 * (wordSize / 8))}
|
||||
* @exception ArrayIndexOutOfBoundsException if {@code offset} is negative.
|
||||
* @exception IllegalArgumentException if {@code iv} is {@code null}
|
||||
* or {@code (iv.length - offset < 2 * (wordSize / 8))}
|
||||
*/
|
||||
public RC5ParameterSpec(int version, int rounds, int wordSize,
|
||||
byte[] iv, int offset) {
|
||||
|
|
|
@ -113,16 +113,16 @@ public class SecretKeySpec implements KeySpec, SecretKey {
|
|||
|
||||
/**
|
||||
* Constructs a secret key from the given byte array, using the first
|
||||
* <code>len</code> bytes of <code>key</code>, starting at
|
||||
* <code>offset</code> inclusive.
|
||||
* {@code len} bytes of {@code key}, starting at
|
||||
* {@code offset} inclusive.
|
||||
*
|
||||
* <p> The bytes that constitute the secret key are
|
||||
* those between <code>key[offset]</code> and
|
||||
* <code>key[offset+len-1]</code> inclusive.
|
||||
* those between {@code key[offset]} and
|
||||
* {@code key[offset+len-1]} inclusive.
|
||||
*
|
||||
* <p>This constructor does not check if the given bytes indeed specify a
|
||||
* secret key of the specified algorithm. For example, if the algorithm is
|
||||
* DES, this constructor does not check if <code>key</code> is 8 bytes
|
||||
* DES, this constructor does not check if {@code key} is 8 bytes
|
||||
* long, and also does not check for weak or semi-weak keys.
|
||||
* In order for those checks to be performed, an algorithm-specific key
|
||||
* specification class (in this case:
|
||||
|
@ -130,10 +130,10 @@ public class SecretKeySpec implements KeySpec, SecretKey {
|
|||
* must be used.
|
||||
*
|
||||
* @param key the key material of the secret key. The first
|
||||
* <code>len</code> bytes of the array beginning at
|
||||
* <code>offset</code> inclusive are copied to protect
|
||||
* {@code len} bytes of the array beginning at
|
||||
* {@code offset} inclusive are copied to protect
|
||||
* against subsequent modification.
|
||||
* @param offset the offset in <code>key</code> where the key material
|
||||
* @param offset the offset in {@code key} where the key material
|
||||
* starts.
|
||||
* @param len the length of the key material.
|
||||
* @param algorithm the name of the secret key algorithm to be associated
|
||||
|
@ -142,12 +142,11 @@ public class SecretKeySpec implements KeySpec, SecretKey {
|
|||
* <a href="{@docRoot}/../specs/security/standard-names.html#secretkey-algorithms">
|
||||
* Java Security Standard Algorithm Names Specification</a>
|
||||
* for information about standard secret key algorithm names.
|
||||
* @exception IllegalArgumentException if <code>algorithm</code>
|
||||
* is null or <code>key</code> is null, empty, or too short,
|
||||
* @exception IllegalArgumentException if {@code algorithm}
|
||||
* is {@code null} or {@code key} is {@code null}, empty, or too short,
|
||||
* i.e. {@code key.length-offset<len}.
|
||||
* @exception ArrayIndexOutOfBoundsException is thrown if
|
||||
* <code>offset</code> or <code>len</code> index bytes outside the
|
||||
* <code>key</code>.
|
||||
* @exception ArrayIndexOutOfBoundsException if
|
||||
* {@code offset} or {@code len} are negative.
|
||||
*
|
||||
* @spec security/standard-names.html Java Security Standard Algorithm Names
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue