Skip to content

Commit 76a9412

Browse files
committed
CODEC-218 remove unnecessary duplicate method HmacAlgorithms.getInitializedMac
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1744329 13f79535-47bb-0310-9956-ffa450edef68
1 parent ceb5ccb commit 76a9412

2 files changed

Lines changed: 1 addition & 17 deletions

File tree

src/main/java/org/apache/commons/codec/digest/HmacAlgorithms.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,6 @@ public Mac getHmac(final byte[] key) {
120120
return HmacUtils.getInitializedMac(name, key);
121121
}
122122

123-
/**
124-
* Returns an initialized <code>Mac</code> for this algorithm.
125-
*
126-
* @param key
127-
* They key for the keyed digest (must not be null)
128-
* @return A Mac instance initialized with the given key.
129-
* @see Mac#getInstance(String)
130-
* @see Mac#init(Key)
131-
* @throws IllegalArgumentException
132-
* when key is null or invalid.
133-
* @since 1.11
134-
*/
135-
public Mac getInitializedMac(final byte[] key) {
136-
return HmacUtils.getInitializedMac(name, key);
137-
}
138-
139123
/**
140124
* Gets the algorithm name.
141125
*

src/main/java/org/apache/commons/codec/digest/HmacUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public static Mac getHmacSha512(final byte[] key) {
162162
*/
163163
@Deprecated
164164
public static Mac getInitializedMac(final HmacAlgorithms algorithm, final byte[] key) {
165-
return algorithm.getInitializedMac(key);
165+
return algorithm.getHmac(key);
166166
}
167167

168168
/**

0 commit comments

Comments
 (0)