public class CryptoKt
| Modifier and Type | Method and Description |
|---|---|
static Digest |
Digest(java.lang.String name) |
static java.lang.Object |
build(Digest $receiver,
byte[] bytes,
kotlin.coroutines.experimental.Continuation<? super byte[]> p) |
static java.lang.Object |
build(Digest $receiver,
java.lang.String string,
java.nio.charset.Charset charset,
kotlin.coroutines.experimental.Continuation<? super byte[]> p) |
static java.lang.String |
generateNonce()
Generates a nonce string 16 characters long. Could block if the system's entropy source is empty
|
static byte[] |
generateNonce(int size) |
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 java.lang.String |
hex(byte[] bytes)
Encode bytes as a HEX string with no spaces, newlines and
0x prefixes. |
static byte[] |
hex(java.lang.String s)
Decode bytes from HEX string. It should be no spaces 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 java.util.Random getNonceRandom()
public static Digest Digest(java.lang.String name)
public static java.lang.String generateNonce()
Generates a nonce string 16 characters long. Could block if the system's entropy source is empty
public static byte[] generateNonce(int size)
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 java.lang.String hex(byte[] bytes)
Encode bytes as a HEX string with no spaces, newlines and 0x prefixes.
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 nextNonce()
Generates a nonce string 16 characters long. Could block if the system's entropy source is empty
public static byte[] raw(java.lang.String s)
Encode string as UTF-8 bytes
public static byte[] sha1(byte[] bytes)
Compute SHA-1 hash for the specified bytes
public static java.lang.Object build(Digest $receiver, byte[] bytes, kotlin.coroutines.experimental.Continuation<? super byte[]> p)
public static java.lang.Object build(Digest $receiver, java.lang.String string, java.nio.charset.Charset charset, kotlin.coroutines.experimental.Continuation<? super byte[]> p)