File tree Expand file tree Collapse file tree
src/main/java/com/maxmind/minfraud/request Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66import java .math .BigInteger ;
77import java .nio .charset .Charset ;
8+ import java .nio .charset .StandardCharsets ;
89import java .security .MessageDigest ;
910import java .security .NoSuchAlgorithmException ;
1011
@@ -52,7 +53,7 @@ public Account.Builder userId(String id) {
5253 public Account .Builder username (String username ) {
5354 try {
5455 MessageDigest d = MessageDigest .getInstance ("MD5" );
55- d .update (username .getBytes (Charset . forName ( "UTF8" ) ));
56+ d .update (username .getBytes (StandardCharsets . UTF_8 ));
5657 BigInteger i = new BigInteger (1 , d .digest ());
5758 this .usernameMd5 = String .format ("%032x" , i );
5859 return this ;
Original file line number Diff line number Diff line change 88import java .math .BigInteger ;
99import java .net .IDN ;
1010import java .nio .charset .Charset ;
11+ import java .nio .charset .StandardCharsets ;
1112import java .security .MessageDigest ;
1213import java .security .NoSuchAlgorithmException ;
1314import java .util .Collections ;
@@ -156,7 +157,7 @@ public String getAddress() {
156157 String cleanAddress = cleanAddress (address );
157158 try {
158159 MessageDigest d = MessageDigest .getInstance ("MD5" );
159- d .update (cleanAddress .getBytes (Charset . forName ( "UTF8" ) ));
160+ d .update (cleanAddress .getBytes (StandardCharsets . UTF_8 ));
160161 BigInteger i = new BigInteger (1 , d .digest ());
161162 return String .format ("%032x" , i );
162163 } catch (NoSuchAlgorithmException e ) {
You can’t perform that action at this time.
0 commit comments