Skip to content

Commit 002679a

Browse files
koushikthirupatturwangweij
authored andcommitted
8347065: Add missing @SPEC tags for Java Security Standard Algorithm Names
Reviewed-by: weijun
1 parent 99002e4 commit 002679a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+201
-44
lines changed

src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -88,6 +88,7 @@
8888
* Consult the release documentation for your implementation to see if any
8989
* other algorithms are supported.
9090
*
91+
* @spec security/standard-names.html Java Security Standard Algorithm Names
9192
* @author Jan Luehe
9293
*
9394
*
@@ -161,6 +162,7 @@ public final String getAlgorithm() {
161162
* Java Security Standard Algorithm Names Specification</a>
162163
* for information about standard algorithm names.
163164
*
165+
* @spec security/standard-names.html Java Security Standard Algorithm Names
164166
* @return the new {@code AlgorithmParameterGenerator} object
165167
*
166168
* @throws NoSuchAlgorithmException if no {@code Provider} supports an
@@ -208,6 +210,7 @@ public static AlgorithmParameterGenerator getInstance(String algorithm)
208210
*
209211
* @param provider the string name of the {@code Provider}.
210212
*
213+
* @spec security/standard-names.html Java Security Standard Algorithm Names
211214
* @return the new {@code AlgorithmParameterGenerator} object
212215
*
213216
* @throws IllegalArgumentException if the provider name is {@code null}
@@ -258,6 +261,7 @@ public static AlgorithmParameterGenerator getInstance(String algorithm,
258261
*
259262
* @param provider the {@code Provider} object.
260263
*
264+
* @spec security/standard-names.html Java Security Standard Algorithm Names
261265
* @return the new {@code AlgorithmParameterGenerator} object
262266
*
263267
* @throws IllegalArgumentException if the specified provider is

src/java.base/share/classes/java/security/AlgorithmParameters.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -69,6 +69,7 @@
6969
* Consult the release documentation for your implementation to see if any
7070
* other algorithms are supported.
7171
*
72+
* @spec security/standard-names.html Java Security Standard Algorithm Names
7273
* @author Jan Luehe
7374
*
7475
*
@@ -147,6 +148,7 @@ public final String getAlgorithm() {
147148
* Java Security Standard Algorithm Names Specification</a>
148149
* for information about standard algorithm names.
149150
*
151+
* @spec security/standard-names.html Java Security Standard Algorithm Names
150152
* @return the new parameter object
151153
*
152154
* @throws NoSuchAlgorithmException if no {@code Provider} supports an
@@ -194,6 +196,7 @@ public static AlgorithmParameters getInstance(String algorithm)
194196
*
195197
* @param provider the name of the provider.
196198
*
199+
* @spec security/standard-names.html Java Security Standard Algorithm Names
197200
* @return the new parameter object
198201
*
199202
* @throws IllegalArgumentException if the provider name is {@code null}
@@ -244,6 +247,7 @@ public static AlgorithmParameters getInstance(String algorithm,
244247
*
245248
* @param provider the name of the provider.
246249
*
250+
* @spec security/standard-names.html Java Security Standard Algorithm Names
247251
* @return the new parameter object
248252
*
249253
* @throws IllegalArgumentException if the provider is {@code null}

src/java.base/share/classes/java/security/DrbgParameters.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@
229229
*
230230
* @spec https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf
231231
* Recommendation for Random Number Generation Using Deterministic Random Bit Generators
232+
* @spec security/standard-names.html Java Security Standard Algorithm Names
232233
*
233234
* @since 9
234235
*/

src/java.base/share/classes/java/security/KeyFactory.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -84,6 +84,7 @@
8484
* Consult the release documentation for your implementation to see if any
8585
* other algorithms are supported.
8686
*
87+
* @spec security/standard-names.html Java Security Standard Algorithm Names
8788
* @author Jan Luehe
8889
*
8990
* @see Key
@@ -169,6 +170,7 @@ private KeyFactory(String algorithm) throws NoSuchAlgorithmException {
169170
* Java Security Standard Algorithm Names Specification</a>
170171
* for information about standard algorithm names.
171172
*
173+
* @spec security/standard-names.html Java Security Standard Algorithm Names
172174
* @return the new {@code KeyFactory} object
173175
*
174176
* @throws NoSuchAlgorithmException if no {@code Provider} supports a
@@ -205,6 +207,7 @@ public static KeyFactory getInstance(String algorithm)
205207
*
206208
* @param provider the name of the provider.
207209
*
210+
* @spec security/standard-names.html Java Security Standard Algorithm Names
208211
* @return the new {@code KeyFactory} object
209212
*
210213
* @throws IllegalArgumentException if the provider name is {@code null}
@@ -247,6 +250,7 @@ public static KeyFactory getInstance(String algorithm, String provider)
247250
*
248251
* @param provider the provider.
249252
*
253+
* @spec security/standard-names.html Java Security Standard Algorithm Names
250254
* @return the new {@code KeyFactory} object
251255
*
252256
* @throws IllegalArgumentException if the specified provider is

src/java.base/share/classes/java/security/KeyPairGenerator.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -131,6 +131,7 @@
131131
* Consult the release documentation for your implementation to see if any
132132
* other algorithms are supported.
133133
*
134+
* @spec security/standard-names.html Java Security Standard Algorithm Names
134135
* @author Benjamin Renaud
135136
* @since 1.1
136137
*
@@ -157,6 +158,7 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
157158
* "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms">
158159
* Java Security Standard Algorithm Names Specification</a>
159160
* for information about standard algorithm names.
161+
* @spec security/standard-names.html Java Security Standard Algorithm Names
160162
*/
161163
protected KeyPairGenerator(String algorithm) {
162164
this.algorithm = algorithm;
@@ -169,6 +171,7 @@ protected KeyPairGenerator(String algorithm) {
169171
* Java Security Standard Algorithm Names Specification</a>
170172
* for information about standard algorithm names.
171173
*
174+
* @spec security/standard-names.html Java Security Standard Algorithm Names
172175
* @return the standard string name of the algorithm.
173176
*/
174177
public String getAlgorithm() {
@@ -221,6 +224,7 @@ private static KeyPairGenerator getInstance(Instance instance,
221224
* Java Security Standard Algorithm Names Specification</a>
222225
* for information about standard algorithm names.
223226
*
227+
* @spec security/standard-names.html Java Security Standard Algorithm Names
224228
* @return the new {@code KeyPairGenerator} object
225229
*
226230
* @throws NoSuchAlgorithmException if no {@code Provider} supports a
@@ -280,6 +284,7 @@ public static KeyPairGenerator getInstance(String algorithm)
280284
*
281285
* @param provider the string name of the provider.
282286
*
287+
* @spec security/standard-names.html Java Security Standard Algorithm Names
283288
* @return the new {@code KeyPairGenerator} object
284289
*
285290
* @throws IllegalArgumentException if the provider name is {@code null}
@@ -320,6 +325,7 @@ public static KeyPairGenerator getInstance(String algorithm,
320325
* Java Security Standard Algorithm Names Specification</a>
321326
* for information about standard algorithm names.
322327
*
328+
* @spec security/standard-names.html Java Security Standard Algorithm Names
323329
* @param provider the provider.
324330
*
325331
* @return the new {@code KeyPairGenerator} object

src/java.base/share/classes/java/security/KeyStore.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -183,6 +183,7 @@
183183
* Consult the release documentation for your implementation to see if any
184184
* other types are supported.
185185
*
186+
* @spec security/standard-names.html Java Security Standard Algorithm Names
186187
* @author Jan Luehe
187188
*
188189
* @see java.security.PrivateKey
@@ -300,6 +301,7 @@ public PasswordProtection(char[] password) {
300301
* @throws NullPointerException if {@code protectionAlgorithm} is
301302
* {@code null}
302303
*
304+
* @spec security/standard-names.html Java Security Standard Algorithm Names
303305
* @since 1.8
304306
*/
305307
public PasswordProtection(char[] password, String protectionAlgorithm,
@@ -852,6 +854,7 @@ private String getProviderName() {
852854
* Java Security Standard Algorithm Names Specification</a>
853855
* for information about standard keystore types.
854856
*
857+
* @spec security/standard-names.html Java Security Standard Algorithm Names
855858
* @return a keystore object of the specified type
856859
*
857860
* @throws KeyStoreException if no provider supports a
@@ -893,6 +896,7 @@ public static KeyStore getInstance(String type)
893896
*
894897
* @param provider the name of the provider.
895898
*
899+
* @spec security/standard-names.html Java Security Standard Algorithm Names
896900
* @return a keystore object of the specified type
897901
*
898902
* @throws IllegalArgumentException if the provider name is {@code null}
@@ -939,6 +943,7 @@ public static KeyStore getInstance(String type, String provider)
939943
*
940944
* @param provider the provider.
941945
*
946+
* @spec security/standard-names.html Java Security Standard Algorithm Names
942947
* @return a keystore object of the specified type
943948
*
944949
* @throws IllegalArgumentException if the specified provider is

src/java.base/share/classes/java/security/MessageDigest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -96,6 +96,7 @@
9696
* Consult the release documentation for your implementation to see if any
9797
* other algorithms are supported.
9898
*
99+
* @spec security/standard-names.html Java Security Standard Algorithm Names
99100
* @author Benjamin Renaud
100101
* @since 1.1
101102
*
@@ -128,6 +129,7 @@ public abstract class MessageDigest extends MessageDigestSpi {
128129
* "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">
129130
* Java Security Standard Algorithm Names Specification</a>
130131
* for information about standard algorithm names.
132+
* @spec security/standard-names.html Java Security Standard Algorithm Names
131133
*/
132134
protected MessageDigest(String algorithm) {
133135
this.algorithm = algorithm;
@@ -166,6 +168,7 @@ private MessageDigest(String algorithm, Provider p) {
166168
* Java Security Standard Algorithm Names Specification</a>
167169
* for information about standard algorithm names.
168170
*
171+
* @spec security/standard-names.html Java Security Standard Algorithm Names
169172
* @return a {@code MessageDigest} object that implements the
170173
* specified algorithm
171174
*
@@ -221,6 +224,7 @@ public static MessageDigest getInstance(String algorithm)
221224
*
222225
* @param provider the name of the provider.
223226
*
227+
* @spec security/standard-names.html Java Security Standard Algorithm Names
224228
* @return a {@code MessageDigest} object that implements the
225229
* specified algorithm
226230
*
@@ -275,6 +279,7 @@ public static MessageDigest getInstance(String algorithm, String provider)
275279
*
276280
* @param provider the provider.
277281
*
282+
* @spec security/standard-names.html Java Security Standard Algorithm Names
278283
* @return a {@code MessageDigest} object that implements the
279284
* specified algorithm
280285
*
@@ -513,6 +518,7 @@ public void reset() {
513518
* Java Security Standard Algorithm Names Specification</a>
514519
* for information about standard algorithm names.
515520
*
521+
* @spec security/standard-names.html Java Security Standard Algorithm Names
516522
* @return the name of the algorithm
517523
*/
518524
public final String getAlgorithm() {

src/java.base/share/classes/java/security/SecureRandom.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -144,7 +144,7 @@
144144
* RFC 4086: Randomness Requirements for Security
145145
* @spec https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.140-2.pdf
146146
* Security Requirements for Cryptographic Modules
147-
*
147+
* @spec security/standard-names.html Java Security Standard Algorithm Names
148148
* @see java.security.SecureRandomSpi
149149
* @see java.util.Random
150150
*
@@ -214,6 +214,7 @@ public class SecureRandom extends java.util.Random {
214214
* "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
215215
* Java Security Standard Algorithm Names Specification</a>
216216
* for information about standard RNG algorithm names.
217+
* @spec security/standard-names.html Java Security Standard Algorithm Names
217218
*/
218219
public SecureRandom() {
219220
/*
@@ -257,6 +258,7 @@ private boolean getThreadSafe() {
257258
* for information about standard RNG algorithm names.
258259
*
259260
* @param seed the seed.
261+
* @spec security/standard-names.html Java Security Standard Algorithm Names
260262
* @throws NullPointerException if {@code seed} is {@code null}
261263
*/
262264
public SecureRandom(byte[] seed) {
@@ -371,6 +373,7 @@ private String getProviderName() {
371373
* Java Security Standard Algorithm Names Specification</a>
372374
* for information about standard RNG algorithm names.
373375
*
376+
* @spec security/standard-names.html Java Security Standard Algorithm Names
374377
* @return the new {@code SecureRandom} object
375378
*
376379
* @throws NoSuchAlgorithmException if no {@code Provider} supports a
@@ -412,6 +415,7 @@ public static SecureRandom getInstance(String algorithm)
412415
*
413416
* @param provider the name of the provider.
414417
*
418+
* @spec security/standard-names.html Java Security Standard Algorithm Names
415419
* @return the new {@code SecureRandom} object
416420
*
417421
* @throws IllegalArgumentException if the provider name is {@code null}
@@ -456,6 +460,7 @@ public static SecureRandom getInstance(String algorithm, String provider)
456460
*
457461
* @param provider the provider.
458462
*
463+
* @spec security/standard-names.html Java Security Standard Algorithm Names
459464
* @return the new {@code SecureRandom} object
460465
*
461466
* @throws IllegalArgumentException if the specified provider is
@@ -511,6 +516,7 @@ public static SecureRandom getInstance(String algorithm,
511516
* @param params the {@code SecureRandomParameters}
512517
* the newly created {@code SecureRandom} object must support.
513518
*
519+
* @spec security/standard-names.html Java Security Standard Algorithm Names
514520
* @return the new {@code SecureRandom} object
515521
*
516522
* @throws IllegalArgumentException if the specified params is
@@ -563,6 +569,7 @@ public static SecureRandom getInstance(
563569
*
564570
* @param provider the name of the provider.
565571
*
572+
* @spec security/standard-names.html Java Security Standard Algorithm Names
566573
* @return the new {@code SecureRandom} object
567574
*
568575
* @throws IllegalArgumentException if the provider name is {@code null}
@@ -615,6 +622,7 @@ public static SecureRandom getInstance(String algorithm,
615622
*
616623
* @param provider the provider.
617624
*
625+
* @spec security/standard-names.html Java Security Standard Algorithm Names
618626
* @return the new {@code SecureRandom} object
619627
*
620628
* @throws IllegalArgumentException if the specified provider or params

src/java.base/share/classes/java/security/SecureRandomSpi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -79,6 +79,7 @@
7979
* {@code SecureRandom} will call the applicable engine methods
8080
* without any synchronization.
8181
*
82+
* @spec security/standard-names.html Java Security Standard Algorithm Names
8283
* @since 1.2
8384
*/
8485

0 commit comments

Comments
 (0)