Skip to content

Commit

Permalink
add spec links
Browse files Browse the repository at this point in the history
  • Loading branch information
wangweij committed Jan 6, 2025
1 parent cd90591 commit 4634ab1
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/security/Key.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public interface Key extends java.io.Serializable {

/**
* Returns the standard algorithm name for this key. For
* example, "DSA" would indicate that this key is a DSA key.
* example, "RSA" would indicate that this key is an RSA key.
* See the Key Algorithms section in the
* <a href="{@docRoot}/../specs/security/standard-names.html#key-algorithms">
* Java Security Standard Algorithm Names Specification</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public EncodedKeySpec(byte[] 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
*/
protected EncodedKeySpec(byte[] encodedKey, String algorithm) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public PKCS8EncodedKeySpec(byte[] 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public X509EncodedKeySpec(byte[] 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 X509EncodedKeySpec(byte[] encodedKey, String algorithm) {
Expand Down
1 change: 1 addition & 0 deletions src/java.base/share/classes/javax/crypto/KDF.java
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ private static KDF handleException(NoSuchAlgorithmException e)
*
* @see <a href="#DelayedProviderSelection">Delayed Provider
* Selection</a>
* @spec security/standard-names.html Java Security Standard Algorithm Names
*
*/
public SecretKey deriveKey(String alg,
Expand Down
1 change: 1 addition & 0 deletions src/java.base/share/classes/javax/crypto/KDFSpi.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ protected KDFSpi(KDFParameters kdfParameters)
* if {@code alg} is empty or invalid
* @throws NullPointerException
* if {@code alg} or {@code derivationSpec} is null
* @spec security/standard-names.html Java Security Standard Algorithm Names
*/
protected abstract SecretKey engineDeriveKey(String alg,
AlgorithmParameterSpec derivationSpec)
Expand Down
2 changes: 2 additions & 0 deletions src/java.base/share/classes/javax/crypto/KEM.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ public Encapsulated encapsulate() {
* @throws UnsupportedOperationException if the combination of
* {@code from}, {@code to}, and {@code algorithm}
* is not supported by the encapsulator
* @spec security/standard-names.html Java Security Standard Algorithm Names
*/
public Encapsulated encapsulate(int from, int to, String algorithm) {
return e.engineEncapsulate(from, to, algorithm);
Expand Down Expand Up @@ -373,6 +374,7 @@ public SecretKey decapsulate(byte[] encapsulation) throws DecapsulateException {
* @throws UnsupportedOperationException if the combination of
* {@code from}, {@code to}, and {@code algorithm}
* is not supported by the decapsulator
* @spec security/standard-names.html Java Security Standard Algorithm Names
*/
public SecretKey decapsulate(byte[] encapsulation,
int from, int to, String algorithm)
Expand Down
2 changes: 2 additions & 0 deletions src/java.base/share/classes/javax/crypto/KEMSpi.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ interface EncapsulatorSpi {
* is not supported by the encapsulator
* @see KEM.Encapsulated
* @see KEM.Encapsulator#encapsulate(int, int, String)
* @spec security/standard-names.html Java Security Standard Algorithm Names
*/
KEM.Encapsulated engineEncapsulate(int from, int to, String algorithm);

Expand Down Expand Up @@ -213,6 +214,7 @@ interface DecapsulatorSpi {
* {@code from}, {@code to}, and {@code algorithm}
* is not supported by the decapsulator
* @see KEM.Decapsulator#decapsulate(byte[], int, int, String)
* @spec security/standard-names.html Java Security Standard Algorithm Names
*/
SecretKey engineDecapsulate(byte[] encapsulation, int from, int to, String algorithm)
throws DecapsulateException;
Expand Down

0 comments on commit 4634ab1

Please sign in to comment.