package cbcutil

import "github.com/testovoleg/whatsmeow/util/cbcutil"

CBC describes a block cipher mode. In cryptography, a block cipher mode of operation is an algorithm that uses a block cipher to provide an information service such as confidentiality or authenticity. A block cipher by itself is only suitable for the secure cryptographic transformation (encryption or decryption) of one fixed-length group of bits called a block. A mode of operation describes how to repeatedly apply a cipher's single-block operation to securely transform amounts of data larger than a block.

This package simplifies the usage of AES-256-CBC.

Index

Functions

func Decrypt

func Decrypt(key, iv, ciphertext []byte) ([]byte, error)

Decrypt is a function that decrypts a given cipher text with a provided key and initialization vector(iv).

func Encrypt

func Encrypt(key, iv, plaintext []byte) ([]byte, error)

Encrypt is a function that encrypts plaintext with a given key and an optional initialization vector(iv).

Source Files

cbc.go

Version
v0.0.0-20230731113359-3e87cabb9327 (latest)
Published
Jul 31, 2023
Platform
linux/amd64
Imports
6 packages
Last checked
1 month ago

Tools for package owners.