File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
aws-android-sdk-cognitoauth/src/main/java/com/amazonaws/mobileconnectors/cognitoauth/util Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 2020import android .util .Base64 ;
2121
2222import java .nio .charset .Charset ;
23- import java .nio .charset .StandardCharsets ;
2423import java .security .MessageDigest ;
2524import java .security .SecureRandom ;
2625
2726/**
2827 * Utility class to generate random string, hash, and encoding.
28+ *
2929 */
30-
3130public final class Pkce {
3231
3332 /**
@@ -49,7 +48,7 @@ public final static String generateRandom() {
4948 public final static String generateHash (String data ) throws Exception {
5049 String hashedData = data ;
5150 try {
52- byte [] bytes = data .getBytes (StandardCharsets . US_ASCII );
51+ byte [] bytes = data .getBytes ("US-ASCII" );
5352 MessageDigest digest = MessageDigest .getInstance ("SHA-256" );
5453 digest .update (bytes , 0 , bytes .length );
5554 byte [] digestBytes = digest .digest ();
You can’t perform that action at this time.
0 commit comments