crypto

package
v0.0.0-...-dc76364 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HardcodedSalt = "someHardcodedPlaintextSalt"

Variables

This section is empty.

Functions

This section is empty.

Types

type AESCryptoCipher

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

func NewAESCryptoCipher

func NewAESCryptoCipher(key []byte) *AESCryptoCipher

func (*AESCryptoCipher) Decrypt

func (aesc *AESCryptoCipher) Decrypt(ciphertext []byte, username string) ([]byte, error)

func (*AESCryptoCipher) Encrypt

func (aesc *AESCryptoCipher) Encrypt(plaintext []byte, username string) ([]byte, error)

type Cipher

type Cipher interface {
	Decrypt(ciphertext []byte, username string) ([]byte, error)
	Encrypt(plaintext []byte, username string) ([]byte, error)
}

type PBKDF2KeyGen

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

func NewPBKDF2KeyGen

func NewPBKDF2KeyGen(desiredSalt []byte) *PBKDF2KeyGen

func (*PBKDF2KeyGen) DeriveKey

func (k *PBKDF2KeyGen) DeriveKey(password string) []byte

Jump to

Keyboard shortcuts

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