util

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFromFile

func ReadFromFile(path string) ([]byte, error)

func ReadFromUrl

func ReadFromUrl(url string) ([]byte, error)

Types

type CryptoApi

type CryptoApi interface {
	GenKey256(message []byte) []byte
	GenHMacKey256(pincode, message []byte) []byte
	Encrypt(content []byte) ([]byte, error)
	Decrypt(content []byte) ([]byte, error)
}

func NewCrypto

func NewCrypto(message []byte) CryptoApi

func NewHMacCrypto added in v1.3.0

func NewHMacCrypto(pincode, token []byte) CryptoApi

Jump to

Keyboard shortcuts

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