do not add new line to the end of random token string

This commit is contained in:
Dmitry Novotochinov 2019-02-20 18:53:13 +03:00
parent 8b6fb829bd
commit 45ca4d49e5
No known key found for this signature in database
GPG Key ID: 43D1DAF5AD39C927

View File

@ -3,6 +3,7 @@ package im.status.ethereum.keycard;
import android.support.annotation.NonNull;
import android.util.Base64;
import static android.util.Base64.NO_PADDING;
import static android.util.Base64.NO_WRAP;
import java.security.SecureRandom;
@ -63,7 +64,7 @@ public class SmartCardSecrets {
}
public static String randomToken(int length) {
return Base64.encodeToString(randomBytes(length), NO_PADDING);
return Base64.encodeToString(randomBytes(length), (NO_PADDING | NO_WRAP));
}
public static byte[] randomBytes(int length) {