encoding

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBase64

func DecodeBase64(base64Encoded string) ([]byte, error)

DecodeBase64 takes a base64-encoded string and decodes it to a []byte.

func DecodeMsgPack

func DecodeMsgPack(msgpackEncoded []byte) (map[string]interface{}, error)

DecodeMsgPack takes a msgpack'd []byte and decodes it to json.

func EncodeBase64

func EncodeBase64(bytes []byte) string

EncodeBase64 takes a byte array and base 64 encodes it

func EncodeMsgPack

func EncodeMsgPack(data map[string]interface{}) ([]byte, error)

EncodeMsgPack performs message pack encryption Currently this takes a map[string]interface{} parameter because we only want to message pack encode JSON objects

func GenerateSha1Sum

func GenerateSha1Sum(sum []byte) [20]byte

GenerateSha1Sum generates a sha1 sum for a given []byte.

Types

This section is empty.

Jump to

Keyboard shortcuts

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