secrets

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package secrets provides simple utilities for encrypting and decrypting data.

Index

Constants

This section is empty.

Variables

View Source
var ErrDecryptFailed = errors.New("decrypt failed")

ErrDecryptFailed is returned when Decrypt is unable to decrypt due to invalid inputs.

Functions

func Decrypt

func Decrypt(key []byte, data []byte) ([]byte, error)

Decrypt data. Uses AES-256-CFB decrypter.

func Encrypt

func Encrypt(key []byte, data []byte) ([]byte, error)

Encrypt data. Uses AES-256-CFB encrypter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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