Documentation
¶
Index ¶
- Variables
- func HMAC512Split(key, seed []byte) ([]byte, []byte)
- func Hash256d(data []byte) []byte
- func HexChecksumDecode(s string, checksumSize int) ([]byte, error)
- func HexChecksumEncode(b []byte, checksumSize int) string
- func OrSlice(a []byte) byte
- func PaddedCopy(dst, src []byte, size uint)
- func Zero(b []byte)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidChecksum = errors.New("Invalid checksum")
Functions ¶
func HMAC512Split ¶
HMAC512Split computes an HMAC using SHA512 for a given key and seed, splitting the digest into left and right byte slices.
func HexChecksumDecode ¶
HexChecksumDecode decodes a hexidecimal string, verifies the 4 byte checksum and returns the decoded byte slice.
func HexChecksumEncode ¶
HexChecksumEncode appends a 4 byte SHA256d checksum to the byte slice and returns the hexidecimal encoding.
func OrSlice ¶
OrSlice takes the cumulative OR of all bytes in a byte slice. This method is useful for determining whether or not a byte slice has been zeroed.
func PaddedCopy ¶
Copies at most size bytes from src to dst, offset by the difference between size and len(src).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.