aes256cbc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

package aes256cbc Advanced Encryption Standard, with a 256 bit key length, operating in the Chain Block Cipher mode (AES-256-CBC).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(recipientPublicKey keys.PublicKey, message []byte) ([]byte, error)

Encrypt data using recipient public key with AES in CBC mode. Generate an ephemeral private key and IV.

Types

type Decrypter

type Decrypter struct {
	// contains filtered or unexported fields
}

Decrypter will decrypt data using AES256CBC method

func NewDecrypter

func NewDecrypter(privateKey keys.PrivateKey) Decrypter

NewDecrypter create a new decrypter attaching the private key to it

func (Decrypter) Decrypt

func (d Decrypter) Decrypt(data mc.EncryptedContent) (mc.PlainContent, error)

Decrypt data using recipient private key with AES in CBC mode.

Jump to

Keyboard shortcuts

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