encoding

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxFileBlock = 1 * 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStruct

type BaseStruct struct {
	Err error
	// contains filtered or unexported fields
}

func (BaseStruct) String

func (e BaseStruct) String() string

String implements the interface Stringer for encode struct. 实现 Stringer 接口

func (BaseStruct) ToBase32Bytes

func (e BaseStruct) ToBase32Bytes() []byte

ToBase32Bytes outputs as byte slice with base32 encoding. 输出经过 base32 编码的字节切片

func (BaseStruct) ToBase32String

func (e BaseStruct) ToBase32String() string

ToBase32String outputs as string with base32 encoding. 输出经过 base32 编码的字符串

func (BaseStruct) ToBase64Bytes

func (e BaseStruct) ToBase64Bytes() []byte

ToBase64Bytes outputs as byte slice with base64 encoding. 输出经过 base64 编码的字节切片

func (BaseStruct) ToBase64String

func (e BaseStruct) ToBase64String() string

ToBase64String outputs as string with base64 encoding. 输出经过 base64 编码的字符串

func (BaseStruct) ToBytes

func (e BaseStruct) ToBytes() []byte

ToBytes outputs as byte slice. 输出字节切片

func (BaseStruct) ToHexBytes

func (e BaseStruct) ToHexBytes() []byte

ToHexBytes outputs as byte with hex encoding. 输出经过 hex 编码的字节切片

func (BaseStruct) ToHexString

func (e BaseStruct) ToHexString() string

ToHexString outputs as string with hex encoding. 输出经过 hex 编码的字符串

func (BaseStruct) ToString

func (e BaseStruct) ToString() string

ToString outputs as string. 输出字符串

type Decode

type Decode struct {
	BaseStruct
}

func NewDecode

func NewDecode() Decode

func (Decode) ByBase32

func (d Decode) ByBase32() Decode

ByBase32 decodes by base32. 通过 base32 解码

func (Decode) ByBase45

func (d Decode) ByBase45() Decode

ByBase45 decodes by base45. 通过 base45 解码

func (Decode) ByBase58

func (d Decode) ByBase58() Decode

ByBase58 decodes by base58. 通过 base58 解码

func (Decode) ByBase64

func (d Decode) ByBase64() Decode

ByBase64 decodes by base64. 通过 base64 解码

func (Decode) ByBase64URL

func (d Decode) ByBase64URL() Decode

ByBase64URL decodes by base64 for url. 通过 base64 对 url 解码

func (Decode) ByHex

func (d Decode) ByHex() Decode

ByHex decodes by hex. 通过 hex 解码

func (Decode) FromBytes

func (d Decode) FromBytes(b []byte) Decode

FromBytes hash from byte slice. 对字节切片进行编码

func (Decode) FromFile

func (d Decode) FromFile(f interface{}) Decode

FromFile hash from file. 对文件进行编码

func (Decode) FromString

func (d Decode) FromString(s string) Decode

FromString hash from string. 对字符串进行编码

type Encode

type Encode struct {
	BaseStruct
}

func NewEncode

func NewEncode() Encode

func (Encode) ByBase32

func (e Encode) ByBase32() Encode

ByBase32 encodes by base32. 通过 base32 编码

func (Encode) ByBase45

func (e Encode) ByBase45() Encode

ByBase45 encodes by base64. 通过 base45 编码

func (Encode) ByBase58

func (e Encode) ByBase58() Encode

ByBase58 encodes by base58. 通过 base58 编码

func (Encode) ByBase64

func (e Encode) ByBase64() Encode

ByBase64 encodes by base64. 通过 base64 编码

func (Encode) ByBase64URL

func (e Encode) ByBase64URL() Encode

ByBase64URL encodes by base64 for url. 通过 base64 对 url 编码

func (Encode) ByHex

func (e Encode) ByHex() Encode

ByHex encodes by hex. 通过 hex 编码

func (Encode) FromBytes

func (e Encode) FromBytes(b []byte) Encode

FromBytes hash from byte slice. 对字节切片进行编码

func (Encode) FromFile

func (e Encode) FromFile(f interface{}) Encode

FromFile hash from file. 对文件进行编码

func (Encode) FromString

func (e Encode) FromString(s string) Encode

FromString hash from string. 对字符串进行编码

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL