magcrypto

package module
v1.0.1-0...-d5a438c Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 9 Imported by: 0

README

magcrypto

A package containing some useful crypto functions

GoDoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext []byte, secret [32]byte) ([]byte, error)

Decrypt portable decrypt method

func Encrypt

func Encrypt(plaintext []byte, secret [32]byte) ([]byte, error)

Encrypt portable encrypt method

func GenerateKeyPair

func GenerateKeyPair() ([32]byte, [32]byte, error)

GenerateKeyPair private key generation with Curve25519 Diffie-Hellman function

func GenerateSharedKey

func GenerateSharedKey(selfPri, otherPub [32]byte) [32]byte

GenerateSharedKey shared secret generation with Curve25519 Diffie-Hellman function

func Hash

func Hash(tag string, data []byte) []byte

Hash HMAC + SHA2 hash function

func Version

func Version()

Version module version

Types

This section is empty.

Jump to

Keyboard shortcuts

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