Documentation ¶
Index ¶
Constants ¶
View Source
const HashLength = 32
Variables ¶
This section is empty.
Functions ¶
func Hash ¶
func Hash(data interface{}) string
Hash computes hash of the given data using RawHash and returns result as hex decoded string.
func RawHash ¶
func RawHash(data interface{}) []byte
RawHash computes SHA3-256 hash depending on data type and returns the hash bytes.
RawHash panics if data type is unknown.
Known types:
- []byte
- HashBytes
- string
func ReadKeysFile ¶
ReadKeysFile reads file existing in keysFile dir and parses public and private keys from file.
Types ¶
type HashBytes ¶
type HashBytes [HashLength]byte
Click to show internal directories.
Click to hide internal directories.