crypt

package
v0.0.0-...-617b798 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const KeyMask = "******"

Variables

This section is empty.

Functions

func DecodeString

func DecodeString(s string) ([]byte, error)

func Decrypt

func Decrypt(ciphertext []byte, key []byte, nonce []byte) string

Decrypt the ciphertext in byte using key and nonce Return the plain text

func EncodeByte

func EncodeByte(b []byte) string

func Encrypt

func Encrypt(plaintext string, key []byte, nonce []byte) []byte

encrypt the plaintext using key and nonce Return encrypted in byte

func GenerateMasterKey

func GenerateMasterKey() []byte

func GenerateNonce

func GenerateNonce() []byte

func GenerateRandomKey

func GenerateRandomKey(l int) (k []byte)

func Sha256Sum

func Sha256Sum(input string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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