cryptography

package
v0.0.0-...-741ffd6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicCryptographer

type BasicCryptographer struct{}

func (BasicCryptographer) Decrypt

func (bc BasicCryptographer) Decrypt(ciphertext string, key []byte) (plaintext string, err error)

func (BasicCryptographer) Encrypt

func (bc BasicCryptographer) Encrypt(data string, key []byte) (encrypted string)

func (BasicCryptographer) Hash

func (bc BasicCryptographer) Hash(data string) (hash string)

type Cryptographer

type Cryptographer interface {
	Hash(data string) (hash string)
	Encrypt(data string, key []byte) (encrypted string)
	Decrypt(ciphertext string, key []byte) (plaintext string, err error)
}

Jump to

Keyboard shortcuts

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