Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoding ¶
type Encoding interface {
Encode([]byte) ([]byte, error) // Encode input bytes to encoded bytes
EncodeStr(string) (string, error) // Encode input string to encoded string
Decode([]byte) ([]byte, error) // Decode encoded bytes to original bytes
DecodeStr(string) (string, error) // Decode encoded string to original string
}
Encoding defines a common interface for encoding and decoding operations. Implementations must support both byte-level and string-level operations.
func NewEncoding ¶
NewEncoding returns an Encoding implementation based on the selected BaseType. It supports Base58, Base62, and Base64 encodings. Returns nil if base is unsupported.
Click to show internal directories.
Click to hide internal directories.