crypto

package module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: BSD-2-Clause Imports: 8 Imported by: 0

README

Crypto

Library for crypto stuff.

License

This project is licensed under the BSD-style license. See the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypter

type Crypter interface {
	Encrypt(ctx context.Context, value []byte) ([]byte, error)
	Decrypt(ctx context.Context, value []byte) ([]byte, error)
}

func NewCrypter

func NewCrypter(secretKey SecretKey) Crypter

type SecretKey

type SecretKey []byte

SecretKey should be the AES secretKey, either 16 or 32 bytes to select AES-128 or AES-256.

func SecretKeyFromFile

func SecretKeyFromFile(ctx context.Context, path string) (SecretKey, error)

func (SecretKey) Bytes

func (s SecretKey) Bytes() []byte

func (SecretKey) Ptr

func (s SecretKey) Ptr() *SecretKey

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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