This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
moneroutil/internal_test.go
2017-05-13 17:36:32 -07:00

18 lines
279 B
Go

package moneroutil
import (
"encoding/hex"
)
func HexToKey(h string) (result Key) {
byteSlice, _ := hex.DecodeString(h)
copy(result[:], byteSlice)
return
}
func HexToHash(h string) (result Hash) {
byteSlice, _ := hex.DecodeString(h)
copy(result[:], byteSlice)
return
}