base64

package
v1.107.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeIfEncoded

func DecodeIfEncoded(ctx context.Context, s string) (decoded string)

DecodeIfEncoded will attempt to decode any string if they are base64 encoded. If not, the string will be returned as is. If the string is base64 encoded but the decoding fails, the original string will be returned.

func DecodeRecursively

func DecodeRecursively(ctx context.Context, s string) (decoded string)

DecodeRecursively will attempt to decode any string until they are no longer base64 encoded.

func DecodeString

func DecodeString(ctx context.Context, s string) (decoded string, err error)

DecodeString decodes a base64 encoded string. An error is raised if decoding fails.

func Encode

func Encode(b []byte) string

func EncodeString

func EncodeString(s string) string

func IsEncoded

func IsEncoded(s string) bool

IsEncoded checks whether a string is encoded or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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