Files
golang-blockchain/wallet/util.go
T
2022-12-12 09:19:55 -08:00

23 lines
309 B
Go

package wallet
import (
"log"
"github.com/mr-tron/base58"
)
func Base58Encode(input []byte) []byte {
encode := base58.Encode(input)
return []byte(encode)
}
func Base58Decode(input []byte) []byte {
decode, err := base58.Decode(string(input[:]))
if err != nil {
log.Panic(err)
}
return decode
}