mirror of
https://github.com/status-im/react-native-status-keycard.git
synced 2025-02-28 12:00:36 +00:00
do not add new line to the end of random token string
This commit is contained in:
parent
8b6fb829bd
commit
45ca4d49e5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user