66import com .auth0 .jwt .interfaces .ECDSAKeyProvider ;
77import com .auth0 .jwt .interfaces .RSAKeyProvider ;
88
9- import java .io .UnsupportedEncodingException ;
109import java .security .interfaces .*;
1110
1211/**
@@ -138,9 +137,8 @@ public static Algorithm RSA512(RSAKey key) throws IllegalArgumentException {
138137 * @param secret the secret to use in the verify or signing instance.
139138 * @return a valid HMAC256 Algorithm.
140139 * @throws IllegalArgumentException if the provided Secret is null.
141- * @throws UnsupportedEncodingException if the current Java platform implementation doesn't support the UTF-8 character encoding.
142140 */
143- public static Algorithm HMAC256 (String secret ) throws IllegalArgumentException , UnsupportedEncodingException {
141+ public static Algorithm HMAC256 (String secret ) throws IllegalArgumentException {
144142 return new HMACAlgorithm ("HS256" , "HmacSHA256" , secret );
145143 }
146144
@@ -150,9 +148,8 @@ public static Algorithm HMAC256(String secret) throws IllegalArgumentException,
150148 * @param secret the secret to use in the verify or signing instance.
151149 * @return a valid HMAC384 Algorithm.
152150 * @throws IllegalArgumentException if the provided Secret is null.
153- * @throws UnsupportedEncodingException if the current Java platform implementation doesn't support the UTF-8 character encoding.
154151 */
155- public static Algorithm HMAC384 (String secret ) throws IllegalArgumentException , UnsupportedEncodingException {
152+ public static Algorithm HMAC384 (String secret ) throws IllegalArgumentException {
156153 return new HMACAlgorithm ("HS384" , "HmacSHA384" , secret );
157154 }
158155
@@ -162,9 +159,8 @@ public static Algorithm HMAC384(String secret) throws IllegalArgumentException,
162159 * @param secret the secret to use in the verify or signing instance.
163160 * @return a valid HMAC512 Algorithm.
164161 * @throws IllegalArgumentException if the provided Secret is null.
165- * @throws UnsupportedEncodingException if the current Java platform implementation doesn't support the UTF-8 character encoding.
166162 */
167- public static Algorithm HMAC512 (String secret ) throws IllegalArgumentException , UnsupportedEncodingException {
163+ public static Algorithm HMAC512 (String secret ) throws IllegalArgumentException {
168164 return new HMACAlgorithm ("HS512" , "HmacSHA512" , secret );
169165 }
170166
0 commit comments