crypto

package
v0.0.0-...-f4df827 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCRYPT_COST_FACTOR     = 16384
	SCRYPT_BLOCK_SIZE      = 8
	SCRYPT_PARALLELIZATION = 1
	SCRYPT_OUTPUT_SIZE     = 32
	SCRYPT_SALT_SIZE       = 32
)
View Source
const (
	ECPrivateKey  = "EC PRIVATE KEY"
	RSAPrivateKey = "RSA PRIVATE KEY"
)
View Source
const (
	AlgRSA = "rsa"
)

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(password string, hash string) (bool, error)

func HashPassword

func HashPassword(password string) (string, error)

func LoadPEMKeys

func LoadPEMKeys(keyPEM []byte) ([]interface{}, error)

Types

type KeyManager

type KeyManager interface {
	FingerPrint(pubkey string) (string, error)
	CreateKeyPair(algorith string, bits int) (string, string, error)
}

func NewSSHKeyManager

func NewSSHKeyManager() KeyManager

func NewX509KeyManager

func NewX509KeyManager() KeyManager

Jump to

Keyboard shortcuts

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