编码base64类

package
v0.0.0-...-2910145 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package gbase64 提供了用于 BASE64 编码/解码算法的有用 API。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func X字节集编码

func X字节集编码(字节集 []byte) []byte

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

func X字节集编码到文本

func X字节集编码到文本(字节集 []byte) string

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

func X字节集解码

func X字节集解码(字节集 []byte) ([]byte, error)

Decode 使用BASE64算法解码字节。

func X字节集解码PANI

func X字节集解码PANI(字节集 []byte) []byte

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

func X文件编码到字节集

func X文件编码到字节集(文件路径 string) ([]byte, error)

EncodeFile 使用BASE64算法对`path`指定的文件内容进行编码。

func X文件编码到字节集PANI

func X文件编码到字节集PANI(文件路径 string) []byte

MustEncodeFile 使用BASE64算法对`path`指定文件的内容进行编码。 如果出现任何错误,将会导致panic。

func X文件编码到文本

func X文件编码到文本(文件路径 string) (string, error)

EncodeFileToString 使用BASE64算法将`path`指定文件的内容编码为字符串。

func X文件编码到文本PANI

func X文件编码到文本PANI(文件路径 string) string

MustEncodeFileToString 使用BASE64算法将`path`指定文件的内容编码为字符串。 如果发生任何错误,它将会引发panic。

func X文本编码

func X文本编码(文本 string) string

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

func X文本解码

func X文本解码(文本 string) (string, error)

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

func X文本解码PANI

func X文本解码PANI(文本 string) string

MustDecodeToString 使用BASE64算法解码字符串。 如果出现任何错误,将会导致panic。

func X文本解码到字节集

func X文本解码到字节集(文本 string) ([]byte, error)

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

func X文本解码到字节集PANI

func X文本解码到字节集PANI(文本 string) []byte

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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