gbase64

package
v1.16.9 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 2 Imported by: 23

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

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

Decode decodes bytes with BASE64 algorithm.

func DecodeString

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

DecodeString decodes string with BASE64 algorithm.

func DecodeToString added in v1.9.4

func DecodeToString(data string) (string, error)

DecodeString decodes string with BASE64 algorithm.

func Encode

func Encode(src []byte) []byte

Encode encodes bytes with BASE64 algorithm.

func EncodeFile added in v1.10.0

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

EncryptFile encodes file content of <path> using BASE64 algorithms.

func EncodeFileToString added in v1.10.0

func EncodeFileToString(path string) (string, error)

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

func EncodeString

func EncodeString(src string) string

EncodeString encodes string with BASE64 algorithm.

func EncodeToString added in v1.9.4

func EncodeToString(src []byte) string

EncodeToString encodes bytes to string with BASE64 algorithm.

func MustDecode added in v1.10.1

func MustDecode(data []byte) []byte

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

func MustDecodeString added in v1.10.1

func MustDecodeString(data string) []byte

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

func MustDecodeToString added in v1.10.1

func MustDecodeToString(data string) string

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

func MustEncodeFile added in v1.10.1

func MustEncodeFile(path string) []byte

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

func MustEncodeFileToString added in v1.10.1

func MustEncodeFileToString(path string) string

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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