Commit 3f062818 authored by alexander's avatar alexander

Fix SPARK-1803

parent 091eacf1
......@@ -41,7 +41,7 @@ public class ScramUtils {
private ScramUtils() {}
public static byte[] createSaltedPassword(byte[] salt, String password, int iters) throws SaslException {
Mac mac = createSha1Hmac(password.getBytes(StandardCharsets.US_ASCII));
Mac mac = createSha1Hmac(password.getBytes(StandardCharsets.UTF_8));
mac.update(salt);
mac.update(new byte[]{0, 0, 0, 1});
byte[] result = mac.doFinal();
......@@ -61,7 +61,7 @@ public class ScramUtils {
public static byte[] computeHmac(final byte[] key, final String string)
throws SaslException {
Mac mac = createSha1Hmac(key);
mac.update(string.getBytes(StandardCharsets.US_ASCII));
mac.update(string.getBytes(StandardCharsets.UTF_8));
return mac.doFinal();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment