package base64

import "cuelang.org/go/pkg/encoding/base64"

Package base64 implements base64 encoding as specified by RFC 4648.

Index

Functions

func Decode

func Decode(encoding cue.Value, s string) ([]byte, error)

Decode returns the bytes represented by the base64 string s. Encoding needs to be set to null as only StdEncoding is supported for now.

func DecodedLen

func DecodedLen(encoding cue.Value, x int) (int, error)

DecodedLen returns the maximum length in bytes of the decoded data corresponding to n bytes of base64-encoded data. Encoding needs to be set to null as only StdEncoding is supported for now.

func Encode

func Encode(encoding cue.Value, src []byte) (string, error)

Encode returns the base64 encoding of src. Encoding needs to be set to null as only StdEncoding is supported for now.

func EncodedLen

func EncodedLen(encoding cue.Value, n int) (int, error)

EncodedLen returns the length in bytes of the base64 encoding of an input buffer of length n. Encoding needs to be set to null as only StdEncoding is supported for now.

Source Files

manual.go pkg.go

Version
v0.12.0 (latest)
Published
Jan 30, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
8 hours ago

Tools for package owners.