encoding

package
v0.0.0-...-5a547ea Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const EmptyMD5Hash string = "00000000000000000000000000000000"

Variables

This section is empty.

Functions

func DecodeBase64

func DecodeBase64(data []byte) ([]byte, error)

DecodeBase64 returns the bytes represented by the base64 bytes data.

func DecodeBase64FromString

func DecodeBase64FromString(data string) ([]byte, error)

DecodeBase64FromString returns the bytes represented by the base64 string data.

func DecodeBase64String

func DecodeBase64String(data string) string

DecodeBase64String returns the string represented by the base64 string data.

func EncodeBase64

func EncodeBase64(data []byte) []byte

EncodeBase64 returns the base64 bytes encoding of bytes data.

func EncodeBase64String

func EncodeBase64String(data string) string

EncodeBase64String returns the base64 string encoding of string data.

func EncodeBase64ToString

func EncodeBase64ToString(data []byte) string

EncodeBase64ToString returns the base64 encoding of data.

func EncodeHash

func EncodeHash(s string) string

EncodeHash returns the sha1 encoding of s.

func EncodeHash256

func EncodeHash256(s string) string

EncodeHash256 returns the sha256 encoding of s.

func EncodeHash512

func EncodeHash512(s string) string

EncodeHash512 returns the sha256 encoding of s.

func EncodeMD5

func EncodeMD5(s string) string

EncodeMD5 returns the md5 encoding of s.

func ValidHash

func ValidHash(s string) bool

ValidHash returns true if length of s same as size of a SHA1 checksum.

func ValidHash256

func ValidHash256(s string) bool

ValidHash256 returns true if length of s same as size of a SHA256 checksum.

func ValidHash512

func ValidHash512(s string) bool

ValidHash512 returns true if length of s same as size of a SHA-512 checksum.

func ValidMD5

func ValidMD5(s string) bool

ValidMD5 returns true if length of s same as size of an MD5 checksum.

Types

This section is empty.

Jump to

Keyboard shortcuts

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