cipher

package
v0.0.0-...-2acb8fa Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptReader

func DecryptReader(key string, r io.Reader) (*cipher.StreamReader, error)

DecryptReader creates and returns a cipher.StreamReader that decrypts data read from an io.Reader using AES-256 in CFB mode. It takes a key as a string and an io.Reader from which the encrypted data will be read. Returns the cipher.StreamReader for decryption or an error if the initialization vector cannot be read.

func EncryptWriter

func EncryptWriter(key string, w io.Writer) (*cipher.StreamWriter, error)

EncryptWriter creates and returns a cipher.StreamWriter that encrypts data written to it using AES-256 in CFB mode. It takes a key as a string and an io.Writer where the encrypted data will be written. Returns the cipher.StreamWriter for encryption or an error if the initialization vector cannot be written.

Types

This section is empty.

Jump to

Keyboard shortcuts

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