mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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
|
* @param iv the buffer with the IV. The contents of the
|
||||||
* buffer are copied to protect against subsequent modification.
|
* 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) {
|
public IvParameterSpec(byte[] iv) {
|
||||||
this(iv, 0, iv.length);
|
this(iv, 0, iv.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an IvParameterSpec object using the first <code>len</code>
|
* Creates an IvParameterSpec object using the first {@code len}
|
||||||
* bytes in <code>iv</code>, beginning at <code>offset</code>
|
* bytes in {@code iv}, beginning at {@code offset}
|
||||||
* inclusive, as the IV.
|
* inclusive, as the IV.
|
||||||
*
|
*
|
||||||
* <p> The bytes that constitute the IV are those between
|
* <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>
|
* @param iv the buffer with the IV. The first {@code len}
|
||||||
* bytes of the buffer beginning at <code>offset</code> inclusive
|
* bytes of the buffer beginning at {@code offset} inclusive
|
||||||
* are copied to protect against subsequent modification.
|
* 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.
|
* starts.
|
||||||
* @param len the number of IV bytes.
|
* @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)}
|
* or {@code (iv.length - offset < len)}
|
||||||
* @throws ArrayIndexOutOfBoundsException is thrown if <code>offset</code>
|
* @throws ArrayIndexOutOfBoundsException if {@code offset}
|
||||||
* or <code>len</code> index bytes outside the <code>iv</code>.
|
* or {@code len} are negative.
|
||||||
*/
|
*/
|
||||||
public IvParameterSpec(byte[] iv, int offset, int len) {
|
public IvParameterSpec(byte[] iv, int offset, int len) {
|
||||||
if (iv == null) {
|
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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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.
|
* are copied to protect against subsequent modification.
|
||||||
* @param offset the offset in {@code iv} where the 8-byte IV
|
* @param offset the offset in {@code iv} where the 8-byte IV
|
||||||
* starts.
|
* 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) {
|
public RC2ParameterSpec(int effectiveKeyBits, byte[] iv, int offset) {
|
||||||
this.effectiveKeyBits = effectiveKeyBits;
|
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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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}
|
* bytes of the buffer beginning at {@code offset}
|
||||||
* inclusive are copied to protect against subsequent modification.
|
* inclusive are copied to protect against subsequent modification.
|
||||||
* @param offset the offset in {@code iv} where the IV starts.
|
* @param offset the offset in {@code iv} where the IV starts.
|
||||||
* @exception IllegalArgumentException if {@code iv} is
|
* @exception ArrayIndexOutOfBoundsException if {@code offset} is negative.
|
||||||
* {@code null} or
|
* @exception IllegalArgumentException if {@code iv} is {@code null}
|
||||||
* {@code (iv.length - offset < 2 * (wordSize / 8))}
|
* or {@code (iv.length - offset < 2 * (wordSize / 8))}
|
||||||
*/
|
*/
|
||||||
public RC5ParameterSpec(int version, int rounds, int wordSize,
|
public RC5ParameterSpec(int version, int rounds, int wordSize,
|
||||||
byte[] iv, int offset) {
|
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
|
* Constructs a secret key from the given byte array, using the first
|
||||||
* <code>len</code> bytes of <code>key</code>, starting at
|
* {@code len} bytes of {@code key}, starting at
|
||||||
* <code>offset</code> inclusive.
|
* {@code offset} inclusive.
|
||||||
*
|
*
|
||||||
* <p> The bytes that constitute the secret key are
|
* <p> The bytes that constitute the secret key are
|
||||||
* those between <code>key[offset]</code> and
|
* those between {@code key[offset]} and
|
||||||
* <code>key[offset+len-1]</code> inclusive.
|
* {@code key[offset+len-1]} inclusive.
|
||||||
*
|
*
|
||||||
* <p>This constructor does not check if the given bytes indeed specify a
|
* <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
|
* 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.
|
* long, and also does not check for weak or semi-weak keys.
|
||||||
* In order for those checks to be performed, an algorithm-specific key
|
* In order for those checks to be performed, an algorithm-specific key
|
||||||
* specification class (in this case:
|
* specification class (in this case:
|
||||||
|
@ -130,10 +130,10 @@ public class SecretKeySpec implements KeySpec, SecretKey {
|
||||||
* must be used.
|
* must be used.
|
||||||
*
|
*
|
||||||
* @param key the key material of the secret key. The first
|
* @param key the key material of the secret key. The first
|
||||||
* <code>len</code> bytes of the array beginning at
|
* {@code len} bytes of the array beginning at
|
||||||
* <code>offset</code> inclusive are copied to protect
|
* {@code offset} inclusive are copied to protect
|
||||||
* against subsequent modification.
|
* 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.
|
* starts.
|
||||||
* @param len the length of the key material.
|
* @param len the length of the key material.
|
||||||
* @param algorithm the name of the secret key algorithm to be associated
|
* @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">
|
* <a href="{@docRoot}/../specs/security/standard-names.html#secretkey-algorithms">
|
||||||
* Java Security Standard Algorithm Names Specification</a>
|
* Java Security Standard Algorithm Names Specification</a>
|
||||||
* for information about standard secret key algorithm names.
|
* for information about standard secret key algorithm names.
|
||||||
* @exception IllegalArgumentException if <code>algorithm</code>
|
* @exception IllegalArgumentException if {@code algorithm}
|
||||||
* is null or <code>key</code> is null, empty, or too short,
|
* is {@code null} or {@code key} is {@code null}, empty, or too short,
|
||||||
* i.e. {@code key.length-offset<len}.
|
* i.e. {@code key.length-offset<len}.
|
||||||
* @exception ArrayIndexOutOfBoundsException is thrown if
|
* @exception ArrayIndexOutOfBoundsException if
|
||||||
* <code>offset</code> or <code>len</code> index bytes outside the
|
* {@code offset} or {@code len} are negative.
|
||||||
* <code>key</code>.
|
|
||||||
*
|
*
|
||||||
* @spec security/standard-names.html Java Security Standard Algorithm Names
|
* @spec security/standard-names.html Java Security Standard Algorithm Names
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue