Documentation
¶
Index ¶
- func Base32Decode(encoded string) ([]byte, error)
- func Base32Encode(bytes []byte) string
- func Base58Decode(encoded string) ([]byte, error)
- func Base58Encode(bytes []byte) string
- func Base64Decode(encoded string) ([]byte, error)
- func Base64Encode(bytes []byte) string
- func HexDecode(encoded string) ([]byte, error)
- func HexEncode(bytes []byte) string
- func MsgpackMarshal(v any) ([]byte, error)
- func MsgpackUnmarshal(bytes []byte, v any) error
- func SanitizeDecode(encoded string, v any) error
- func SanitizeEncode(v any) (string, error)
- func Uint32Decode(bytes []byte) uint32
- func Uint32Encode(v uint32) []byte
- func Uint64Decode(bytes []byte) uint64
- func Uint64Encode(v uint64) []byte
- type SanitizeEncoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MsgpackUnmarshal ¶
MsgpackUnmarshal 进行msgpack反序列化
Types ¶
type SanitizeEncoder ¶
type SanitizeEncoder struct {
// contains filtered or unexported fields
}
SanitizeEncoder 使用msgpack对任意类型进行序列化,之后使用自定义码集的base58进行编码. 如果数据不想直接展示出来,可使用这种方式 进行编解码,从而起到脱敏的效果,且编码出的内容比较短, 注意这只起到脱敏的效果,并不是安全地加解密操作
func NewSanitizeEncoder ¶
func NewSanitizeEncoder(alphabet string) *SanitizeEncoder
NewSanitizeEncoder 通过自定义码集创建一个脱敏编码对象
Click to show internal directories.
Click to hide internal directories.