gbase64

原文:https://pkg.go.dev/github.com/gogf/gf/v2@v2.6.4/encoding/gbase64

Package gbase64 provides useful API for BASE64 encoding/decoding algorithm.

​ 软件包 gbase64 为 BASE64 编码/解码算法提供了有用的 API。

常量

This section is empty.

变量

This section is empty.

函数

func Decode

1
func Decode(data []byte) ([]byte, error)

Decode decodes bytes with BASE64 algorithm.

​ Decode 使用 BASE64 算法解码字节。

func DecodeString

1
func DecodeString(data string) ([]byte, error)

DecodeString decodes string with BASE64 algorithm.

​ DecodeString 使用 BASE64 算法解码字符串。

func DecodeToString

1
func DecodeToString(data string) (string, error)

DecodeToString decodes string with BASE64 algorithm.

​ DecodeToString 使用 BASE64 算法解码字符串。

func Encode

1
func Encode(src []byte) []byte

Encode encodes bytes with BASE64 algorithm.

​ Encode 使用 BASE64 算法对字节进行编码。

func EncodeFile

1
func EncodeFile(path string) ([]byte, error)

EncodeFile encodes file content of path using BASE64 algorithms.

​ EncodeFile path 使用 BASE64 算法对文件内容进行编码。

func EncodeFileToString

1
func EncodeFileToString(path string) (string, error)

EncodeFileToString encodes file content of path to string using BASE64 algorithms.

​ EncodeFileToString 使用 BASE64 算法对 path to 字符串的文件内容进行编码。

func EncodeString

1
func EncodeString(src string) string

EncodeString encodes string with BASE64 algorithm.

​ EncodeString 使用 BASE64 算法对字符串进行编码。

func EncodeToString

1
func EncodeToString(src []byte) string

EncodeToString encodes bytes to string with BASE64 algorithm.

​ EncodeToString 使用 BASE64 算法将字节编码为字符串。

func MustDecode

1
func MustDecode(data []byte) []byte

MustDecode decodes bytes with BASE64 algorithm. It panics if any error occurs.

​ MustDecode 使用 BASE64 算法解码字节。如果发生任何错误,它会崩溃。

func MustDecodeString

1
func MustDecodeString(data string) []byte

MustDecodeString decodes string with BASE64 algorithm. It panics if any error occurs.

​ MustDecodeString 使用 BASE64 算法解码字符串。如果发生任何错误,它会崩溃。

func MustDecodeToString

1
func MustDecodeToString(data string) string

MustDecodeToString decodes string with BASE64 algorithm. It panics if any error occurs.

​ MustDecodeToString 使用 BASE64 算法解码字符串。如果发生任何错误,它会崩溃。

func MustEncodeFile

1
func MustEncodeFile(path string) []byte

MustEncodeFile encodes file content of path using BASE64 algorithms. It panics if any error occurs.

​ MustEncodeFile path 使用 BASE64 算法对文件内容进行编码。如果发生任何错误,它会崩溃。

func MustEncodeFileToString

1
func MustEncodeFileToString(path string) string

MustEncodeFileToString encodes file content of path to string using BASE64 algorithms. It panics if any error occurs.

​ MustEncodeFileToString 使用 BASE64 算法对 path to 字符串的文件内容进行编码。如果发生任何错误,它会崩溃。

类型

This section is empty.

最后修改 March 29, 2024: 更新 (b5c9128)