crypto

package
v0.0.0-...-39615a4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKey = "this-default-key-is-not-secure-!"

DefaultKey for encryption and descryption

Functions

func Decrypt

func Decrypt(ciphertext []byte, key []byte) ([]byte, error)

Decrypt decrypts

func DecryptHexString

func DecryptHexString(cipherhex string, key string) (string, error)

DecryptHexString takes cipher in hex. This func converts hex to bytes before decrypting

func Encrypt

func Encrypt(plaintext []byte, key []byte) ([]byte, error)

Encrypt encrypts

Types

This section is empty.

Jump to

Keyboard shortcuts

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