public final class Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static Integer |
getAndroidApiLevel()
Returns the current Andrdoid API level as integer or null if we do not run on Android.
|
static int |
randKeyId()
Returns a positive random int which can be used as a key ID in a keyset.
|
static Bytes |
toBytesFromPrintableAscii(String s)
Converts a string
s to a corresponding Bytes object. |
public static int randKeyId()
public static final Bytes toBytesFromPrintableAscii(String s)
s to a corresponding Bytes object.
The string must contain only printable ASCII characters; calling it in any other way is a considered a bug in Tink. Spaces are not allowed.
TinkBugException - if s contains a character which is not a printable ASCII character.