public class CryptoKt
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decodeBase64(java.lang.String s)
Decode bytes from a BASE64 string s
|
static java.lang.String |
encodeBase64(byte[] bytes)
Encode bytes as a BASE64 string
|
static java.lang.String |
generateNonce()
Generates a nonce string 16 characters long. Could block if the system's entropy source is empty
|
static kotlin.jvm.functions.Function1<java.lang.String,kotlin.Array[]> |
getDigestFunction(java.lang.String algorithm,
java.lang.String salt)
Create a digest function with the specified algorithm and salt
|
static java.util.Random |
getNonceRandom()
Deprecated.
|
static byte[] |
hex(java.lang.String s)
Decode bytes from HEX string. It should be no spaces and
0x prefixes. |
static java.lang.String |
hex(byte[] bytes)
Encode bytes as a HEX string with no spaces, newlines and
0x prefixes. |
static java.lang.String |
nextNonce()
Deprecated.
|
static byte[] |
raw(java.lang.String s)
Deprecated.
|
static byte[] |
sha1(byte[] bytes)
Compute SHA-1 hash for the specified bytes
|
public static kotlin.jvm.functions.Function1<java.lang.String,kotlin.Array[]> getDigestFunction(java.lang.String algorithm,
java.lang.String salt)
Create a digest function with the specified algorithm and salt
public static byte[] decodeBase64(java.lang.String s)
Decode bytes from a BASE64 string s
public static java.lang.String encodeBase64(byte[] bytes)
Encode bytes as a BASE64 string
public static byte[] sha1(byte[] bytes)
Compute SHA-1 hash for the specified bytes
public static byte[] hex(java.lang.String s)
Decode bytes from HEX string. It should be no spaces and 0x prefixes.
public static java.lang.String hex(byte[] bytes)
Encode bytes as a HEX string with no spaces, newlines and 0x prefixes.
public static byte[] raw(java.lang.String s)
Encode string as UTF-8 bytes
public static java.util.Random getNonceRandom()
public static java.lang.String nextNonce()
Generates a nonce string 16 characters long. Could block if the system's entropy source is empty
public static java.lang.String generateNonce()
Generates a nonce string 16 characters long. Could block if the system's entropy source is empty