aes256cbc

package
v0.0.78 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package aes256cbc implements Advanced Encryption Standard with a 256 bit key length, using Chain Block Cipher mode (AES-256-CBC).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decrypter

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

Decrypter will decrypt data using AES256CBC method

func NewDecrypter

func NewDecrypter(privateKey crypto.PrivateKey) (*Decrypter, error)

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.

type Encrypter added in v0.0.24

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

Encrypter will encrypt data using AES256CBC method

func NewEncrypter added in v0.0.24

func NewEncrypter(pubKey crypto.PublicKey) (*Encrypter, error)

NewEncrypter create a new encrypter with crypto rand for reader and attaching the public key to the encrypter.

func (Encrypter) Encrypt added in v0.0.24

func (e Encrypter) Encrypt(message mc.PlainContent) (mc.EncryptedContent, error)

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

Jump to

Keyboard shortcuts

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