aes256cbc

package
v0.0.0-...-72bc2f9 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 17 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

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

Encrypter will encrypt data using AES256CBC method

func NewEncrypter

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

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