crypt

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: GPL-3.0 Imports: 10 Imported by: 9 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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