Fix Hex encoding on older Android versions

Fixes #827
This commit is contained in:
Jakob Nixdorf 2021-06-03 21:04:20 +02:00
parent 4206ebdcf4
commit c8f80be156
No known key found for this signature in database
GPG key ID: BE99BF86574A7DBC

View file

@ -137,7 +137,7 @@ public class TokenCalculator {
byte[] messageDigest = digest.digest();
// Create Hex String
String hexString = Hex.encodeHexString(messageDigest);
String hexString = new String(Hex.encodeHex(messageDigest));
otp = hexString.substring(0, 6);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();