crypto

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 7 Imported by: 7

Documentation

Overview

Package crypto includes common cryptography helpers. They typically make using the stdlib more ergonomic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKey

func CreateKey(keySize int) ([]byte, error)

CreateKey creates a key of a given size by reading that much data off the crypto/rand reader.

func Decrypt

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

Decrypt decrypts data with the given key.

func Encrypt

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

Encrypt encrypts data with the given key.

func HMAC512

func HMAC512(key, plainText []byte) []byte

HMAC512 sha512 hashes data with the given key.

func MustCreateKey

func MustCreateKey(keySize int) []byte

MustCreateKey creates a key, if an error is returned, it panics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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