encrypt

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptionStrategy

type EncryptionStrategy int
const (
	// StrategySymmetric refers to utilizing symmetric encryption
	// (i.e. a single password to encrypt/decrypt data)
	StrategySymmetric EncryptionStrategy = iota

	// StrategyAsymmetric refers to using an RSA private/public keypair
	// for encryption
	StrategyAsymmetric

	// StrategyKeyring refers to using a keyring with many RSA private/public
	// keypairs
	StrategyKeyring
)

type SimpleSymmetricCipher

type SimpleSymmetricCipher struct {
	// contains filtered or unexported fields
}

func NewSymmetricCipher

func NewSymmetricCipher(pass []byte) SimpleSymmetricCipher

func (SimpleSymmetricCipher) Decrypt

func (s SimpleSymmetricCipher) Decrypt(encrypted string) (decrypted string, err error)

func (SimpleSymmetricCipher) Encrypt

func (s SimpleSymmetricCipher) Encrypt(str string) (string, error)

Jump to

Keyboard shortcuts

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