encodes

package
v0.6.15 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package encodes provide some util for encode/decode data

Index

Constants

This section is empty.

Variables

View Source
var (
	B32Std = base32.StdEncoding.WithPadding(base32.NoPadding)
	B32Hex = base32.HexEncoding.WithPadding(base32.NoPadding)
)

base32 encoding with no padding

View Source
var (
	B64Std = base64.StdEncoding.WithPadding(base64.NoPadding)
	B64URL = base64.URLEncoding.WithPadding(base64.NoPadding)
)

base64 encoding with no padding

Functions

func B32Decode

func B32Decode(str string) string

B32Decode base32 decode

func B32Encode

func B32Encode(str string) string

B32Encode base32 encode

func B64Decode

func B64Decode(str string) string

B64Decode base64 decode

func B64DecodeBytes

func B64DecodeBytes(str []byte) []byte

B64DecodeBytes base64 decode

func B64Encode

func B64Encode(str string) string

B64Encode base64 encode

func B64EncodeBytes

func B64EncodeBytes(src []byte) []byte

B64EncodeBytes base64 encode

Types

type BaseEncoder

type BaseEncoder interface {
	Encode(dst []byte, src []byte)
	EncodeToString(src []byte) string
	Decode(dst []byte, src []byte) (n int, err error)
	DecodeString(s string) ([]byte, error)
}

BaseEncoder interface

Directories

Path Synopsis
Package hashutil provide some util for quickly generate hash
Package hashutil provide some util for quickly generate hash
Package secutil provide some security utils
Package secutil provide some security utils

Jump to

Keyboard shortcuts

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