Documentation ¶
Overview ¶
Package ged implements a global-purpose encoding/decoding library.
Index ¶
- func Decode(data []byte, baseFrom uint) ([]byte, error)
- func Decode58(encoded string) ([]byte, error)
- func DecodeHex(encoded string) ([]byte, error)
- func DecodeString(encoded string, alphabet alphabet.Alphabet) ([]byte, error)
- func Encode(data []byte, baseTo uint) []byte
- func Encode58(data []byte) string
- func EncodeHex(data []byte) string
- func EncodeString(data []byte, alphabet alphabet.Alphabet) string
- func Transform(data []byte, baseFrom, baseTo uint) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode58 ¶
DecodeBase58 decodes string from a base58 representation using the Bitcoin alphabet.
func DecodeString ¶
DecodeString decodes string using the provided alphabet.
func EncodeString ¶
EncodeString encodes data using a provided alphabet.
func Transform ¶
Transform is a low-level generic function to transform bytes from a given base to a target base. Returns an error if an element in data is greater or equal than the given base: if the baseFrom is 128, then all elements from data must be lower than 128. baseFrom and baseTo SHOULD NOT be greater than 256 and MUST NOT be lower than 2.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.