base64

package
v2.679.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package base64 provides encoding helpers and adapters used by go-service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(s string) ([]byte, error)

Decode decodes a standard base64-encoded string s into a byte slice.

This helper uses base64.StdEncoding. It allocates a destination buffer sized to the maximum decoded length, then returns the subslice actually written.

It returns a non-nil error if s contains invalid base64 data.

func Encode

func Encode(src []byte) string

Encode encodes src using standard base64 encoding (RFC 4648) and returns the encoded string.

This helper uses base64.StdEncoding and allocates a new buffer sized to the encoded output.

func EncodedLen added in v2.457.0

func EncodedLen(size bytes.Size) int64

EncodedLen returns the length in bytes of the standard base64 encoding of size.

Types

This section is empty.

Jump to

Keyboard shortcuts

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