auth

package
v0.0.0-...-f85d8dc Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeUser

func AuthorizeUser(pwFilePath string, values [][]byte) error

Take users' master password input and compare it to the stored hash, allowing access if match

func CheckEncryptedData

func CheckEncryptedData(encInfoPath string) bool

func CheckMasterPassword

func CheckMasterPassword(pwFilePath string) bool

Check whether master password file exists already

func CheckPasswordStrength

func CheckPasswordStrength(usrInput string) bool

CheckPasswordStrength checks the strength of the user-entered input for master password

func FirstRun

func FirstRun(encInfoPath, pwFilePath string) error

func GetMasterPassword

func GetMasterPassword() string

Ask the user to enter their master password

func HashMasterPassword

func HashMasterPassword(usrInput, pwFilePath string) ([]byte, []byte, error)

Argon2 is considered better than bcrypt for securing passwords

func LoadEncryptedInfo

func LoadEncryptedInfo(encInfoPath string) ([][]byte, error)

func NewEncryptionKey

func NewEncryptionKey() ([]byte, error)

func Run

func Run(encInfoPath, pwFilePath string) ([]byte, error)

func SaveEncryptionData

func SaveEncryptionData(encInfoPath string, values [][]byte) error

Save the salt and sealed encryption key to disk

func SaveMasterPassword

func SaveMasterPassword(pwFilePath string, hashedMasterPassword []byte) error

func SealEncryptionKey

func SealEncryptionKey(hashedPassword []byte, encryptionKey []byte) ([]byte, error)

Seal encryption key for an added layer of protection

func UnsealEncryptionKey

func UnsealEncryptionKey(pwFilePath string, values [][]byte) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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