8346736: Java Security Standard Algorithm Names spec should include key algorithm names

Reviewed-by: mullan, hchao
This commit is contained in:
Weijun Wang 2025-01-27 18:21:51 +00:00
parent aba60a9274
commit 039e73fcdb
9 changed files with 75 additions and 33 deletions

View file

@ -83,16 +83,17 @@ public class PKCS8EncodedKeySpec extends EncodedKeySpec {
* @param encodedKey the key, which is assumed to be
* encoded according to the PKCS #8 standard. The contents of
* the array are copied to protect against subsequent modification.
* @param algorithm the algorithm name of the encoded private key
* See the KeyFactory section in the <a href=
* "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms">
* @param algorithm the algorithm name of the encoded private key.
* See the AsymmetricKey Algorithms section in the
* <a href="{@docRoot}/../specs/security/standard-names.html#asymmetrickey-algorithms">
* Java Security Standard Algorithm Names Specification</a>
* for information about standard algorithm names.
* for information about standard asymmetric key algorithm names.
* @spec security/standard-names.html Java Security Standard Algorithm Names
* @throws NullPointerException if {@code encodedKey}
* or {@code algorithm} is null.
* @throws IllegalArgumentException if {@code algorithm} is
* the empty string {@code ""}
* @spec security/standard-names.html Java Security Standard Algorithm Names
* @since 9
*/
public PKCS8EncodedKeySpec(byte[] encodedKey, String algorithm) {