crypt

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package crypt provides cryptographic funcitonalities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesGcmDecrypt

func AesGcmDecrypt(key []byte, dataB64 string) ([]byte, error)

AesGcmDecrypt decrypts the encrypted data using AES in a GCM mode. The data should be a base64 encoded string in the format of 12 byte nonce followed by a ciphertext.

func AesGcmEncrypt

func AesGcmEncrypt(key, plaintext []byte) (string, error)

AesGcmEncrypt encrypts the plaintext using AES in a GCM mode. It returns a ciphertext prepended by a 12 byte pseudo-random nonce, encoded in base64.

func MakeKeys

func MakeKeys(password, email []byte, iteration int) ([]byte, []byte, error)

MakeKeys derives, from the given credential, a key set comprising of an encryption key and an authentication key

Types

This section is empty.

Jump to

Keyboard shortcuts

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