public class SecureHash extends OpaqueBytes
Container for a cryptographically secure hash value. Provides utilities for generating a cryptographic hash using different algorithms (currently only SHA-256 supported).
Modifier and Type | Class and Description |
---|---|
static class |
SecureHash.Companion |
static class |
SecureHash.SHA256
SHA-256 is part of the SHA-2 hash function family. Generated hash is fixed size, 256-bits (32-bytes)
|
Modifier and Type | Field and Description |
---|---|
static SecureHash.Companion |
Companion |
Modifier and Type | Method and Description |
---|---|
SecureHash.SHA256 |
hashConcat(SecureHash other) |
static SecureHash.SHA256 |
parse(java.lang.String str) |
java.lang.String |
prefixChars(int prefixLen) |
static SecureHash.SHA256 |
randomSHA256() |
static SecureHash.SHA256 |
sha256(byte[] bytes) |
static SecureHash.SHA256 |
sha256(java.lang.String str) |
static SecureHash.SHA256 |
sha256Twice(byte[] bytes) |
java.lang.String |
toString() |
public static SecureHash.Companion Companion
public java.lang.String toString()
public java.lang.String prefixChars(int prefixLen)
public SecureHash.SHA256 hashConcat(SecureHash other)
public static SecureHash.SHA256 parse(java.lang.String str)
public static SecureHash.SHA256 sha256(byte[] bytes)
public static SecureHash.SHA256 sha256Twice(byte[] bytes)
public static SecureHash.SHA256 sha256(java.lang.String str)
public static SecureHash.SHA256 randomSHA256()