Skip to content

Commit cd07a97

Browse files
committed
Javadoc 8.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1619949 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7bf48ee commit cd07a97

4 files changed

Lines changed: 1147 additions & 6 deletions

File tree

src/main/java/org/apache/commons/codec/binary/Base32.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public Base32(final byte pad) {
175175
* <p>
176176
* When encoding the line length is 0 (no chunking).
177177
* </p>
178-
* @param useHex if <code>true</code> then use Base32 Hex alphabet
178+
* @param useHex if {@code true} then use Base32 Hex alphabet
179179
*/
180180
public Base32(final boolean useHex) {
181181
this(0, null, useHex, PAD_DEFAULT);
@@ -186,7 +186,7 @@ public Base32(final boolean useHex) {
186186
* <p>
187187
* When encoding the line length is 0 (no chunking).
188188
* </p>
189-
* @param useHex if <code>true</code> then use Base32 Hex alphabet
189+
* @param useHex if {@code true} then use Base32 Hex alphabet
190190
* @param pad byte used as padding byte.
191191
*/
192192
public Base32(final boolean useHex, final byte pad) {
@@ -246,7 +246,7 @@ public Base32(final int lineLength, final byte[] lineSeparator) {
246246
* @param lineSeparator
247247
* Each line of encoded data will end with this sequence of bytes.
248248
* @param useHex
249-
* if <code>true</code>, then use Base32 Hex alphabet, otherwise use Base32 alphabet
249+
* if {@code true}, then use Base32 Hex alphabet, otherwise use Base32 alphabet
250250
* @throws IllegalArgumentException
251251
* The provided lineSeparator included some Base32 characters. That's not going to work! Or the
252252
* lineLength &gt; 0 and lineSeparator is null.
@@ -271,7 +271,7 @@ public Base32(final int lineLength, final byte[] lineSeparator, final boolean us
271271
* @param lineSeparator
272272
* Each line of encoded data will end with this sequence of bytes.
273273
* @param useHex
274-
* if <code>true</code>, then use Base32 Hex alphabet, otherwise use Base32 alphabet
274+
* if {@code true}, then use Base32 Hex alphabet, otherwise use Base32 alphabet
275275
* @param pad byte used as padding byte.
276276
* @throws IllegalArgumentException
277277
* The provided lineSeparator included some Base32 characters. That's not going to work! Or the
@@ -526,11 +526,11 @@ void encode(final byte[] in, int inPos, final int inAvail, final Context context
526526
}
527527

528528
/**
529-
* Returns whether or not the <code>octet</code> is in the Base32 alphabet.
529+
* Returns whether or not the {@code octet} is in the Base32 alphabet.
530530
*
531531
* @param octet
532532
* The value to test
533-
* @return <code>true</code> if the value is defined in the the Base32 alphabet <code>false</code> otherwise.
533+
* @return {@code true} if the value is defined in the the Base32 alphabet {@code false} otherwise.
534534
*/
535535
@Override
536536
public boolean isInAlphabet(final byte octet) {
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.commons.codec.digest;
19+
20+
/**
21+
* Standard {@link HmacSHA512} algorithm names from the <cite>Java Cryptography Architecture Standard Algorithm Name
22+
* Documentation</cite>.
23+
*
24+
* <p>
25+
* <strong>Note: Not all JCE implementations supports all algorithms in this enum.</strong>
26+
* </p>
27+
*
28+
* @see <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html">Java Cryptography
29+
* Architecture Standard Algorithm Name Documentation</a>
30+
* @since 1.10
31+
* @version $Id$
32+
*/
33+
public enum HmacAlgorithms {
34+
35+
/**
36+
* The HmacMD5 Message Authentication Code (MAC) algorithm specified in RFC 2104 and RFC 1321.
37+
* <p>
38+
* Every implementation of the Java platform is required to support this standard Mac algorithm.
39+
* </p>
40+
*/
41+
HMAC_MD5("HmacMD5"),
42+
43+
/**
44+
* The HmacSHA1 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
45+
* <p>
46+
* Every implementation of the Java platform is required to support this standard Mac algorithm.
47+
* </p>
48+
*/
49+
HMAC_SHA_1("HmacSHA1"),
50+
51+
/**
52+
* The HmacSHA256 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
53+
* <p>
54+
* Every implementation of the Java platform is required to support this standard Mac algorithm.
55+
* </p>
56+
*/
57+
HMAC_SHA_256("HmacSHA256"),
58+
59+
/**
60+
* The HmacSHA384 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
61+
* <p>
62+
* Every implementation of the Java platform is <em>not</em> required to support this Mac algorithm.
63+
* </p>
64+
*/
65+
HMAC_SHA_384("HmacSHA384"),
66+
67+
/**
68+
* The HmacSHA512 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
69+
* <p>
70+
* Every implementation of the Java platform is <em>not</em> required to support this Mac algorithm.
71+
* </p>
72+
*/
73+
HMAC_SHA_512("HmacSHA512");
74+
75+
private final String algorithm;
76+
77+
private HmacAlgorithms(final String algorithm) {
78+
this.algorithm = algorithm;
79+
}
80+
81+
/**
82+
* The algorithm name
83+
*
84+
* @see <a
85+
* href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunJCEProvider">Java
86+
* Cryptography Architecture Sun Providers Documentation</a>
87+
* @return The algorithm name ("HmacSHA512" for example)
88+
*/
89+
@Override
90+
public String toString() {
91+
return algorithm;
92+
}
93+
94+
}

0 commit comments

Comments
 (0)