encoding

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base64

type Base64 struct{}

func (Base64) Decode

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

Decode decodes the byte slice with base64 encoding.

func (Base64) Encode

func (Base64) Encode(data []byte) []byte

Encode encodes the byte slice with base64 encoding.

type Encoding

type Encoding interface {
	// Encode encodes the byte slice.
	Encode(data []byte) []byte

	// Decode decodes the byte slice.
	Decode(data []byte) ([]byte, error)
}

type Hex

type Hex struct{}

func (Hex) Decode

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

Decode decodes the byte slice with hex encoding.

func (Hex) Encode

func (Hex) Encode(data []byte) []byte

Encode encodes the byte slice with hex encoding.

type None

type None struct{}

func (None) Decode

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

Decode returns the original byte slice.

func (None) Encode

func (None) Encode(data []byte) []byte

Encode returns the original byte slice.

Jump to

Keyboard shortcuts

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