internal

package
v0.0.0-...-66272f6 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2019 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildUnallowedCharacters

func BuildUnallowedCharacters(noSymbol, noDigit, noUppercase, noLowercase bool, excludeCharacters string) (unallowedCharacters unallowedCharactersType)

func ByteArrays32Equal

func ByteArrays32Equal(b1 *[32]byte, b2 *[32]byte) bool

func ByteSlicesEqual

func ByteSlicesEqual(b1 *[]byte, b2 *[]byte) bool

func Checksumize

func Checksumize(data *[]byte)

func ClearByteArray32

func ClearByteArray32(secretPtr *[32]byte)

func ClearByteSlice

func ClearByteSlice(secretPtr *[]byte)

func CreateNonInteractive

func CreateNonInteractive(masterPassword string, birthdate string, user string, passphrase string) (err error)

func CreateSeed

func CreateSeed(masterPasswordSHA3 *[32]byte, birthdateSHA3 *[32]byte) (seed *[]byte)

func DateIsValid

func DateIsValid(date *[]byte) bool

func Dechecksumize

func Dechecksumize(data *[]byte) error

func DecryptAES

func DecryptAES(ciphertext *[]byte, key *[32]byte) (plaintext *[]byte, err error)

func DecryptSeed

func DecryptSeed(encryptedSeed *[]byte, passphrase *[]byte) (seed *[]byte, err error)

func DeleteIdentification

func DeleteIdentification(website string, user string) (err error)

func DisplayIdentificationCLI

func DisplayIdentificationCLI(identification IdentificationType)

func DisplayIdentificationsCLI

func DisplayIdentificationsCLI(identifications []IdentificationType)

func DisplaySingleColumnCLI

func DisplaySingleColumnCLI(title string, users []string)

func DumpTable

func DumpTable(tableName string, outputfilename string) error

func EncryptAES

func EncryptAES(plaintext *[]byte, key *[32]byte, ioReadFull ioReadFullFunc) (ciphertext *[]byte, err error)

func EncryptSeed

func EncryptSeed(seed *[]byte, passphrase *[]byte) (encryptedSeed *[]byte, err error)

func EvaluatePassword

func EvaluatePassword(masterPassword *[]byte) (safety uint8, message string)

func ExtractUsers

func ExtractUsers(identifications []IdentificationType) (users []string)

func GetArgonTimePerRound

func GetArgonTimePerRound() int64

func HashAndDestroy

func HashAndDestroy(data *[]byte) (digest *[32]byte)

func HashSHA3_256

func HashSHA3_256(data *[]byte) (digest *[32]byte)

func IdentificationTypeLegendStrings

func IdentificationTypeLegendStrings() []string

func InitiateDatabaseIfNeeded

func InitiateDatabaseIfNeeded() (err error)

func InsertIdentification

func InsertIdentification(identification IdentificationType) (err error)

func MakeKey

func MakeKey(passphrase *[]byte) (key *[32]byte)

func MakePassphrase

func MakePassphrase() (passphrase string, err error)

TODO implement our own passphrases with randsource and testable

func MakePasswordDigest

func MakePasswordDigest(clientSeed *[]byte, website, user string, passwordDerivationVersion uint16) (passwordDigest *[32]byte)

func ReadInput

func ReadInput(prompt string) (input string)

func ReadSecret

func ReadSecret(prompt string) (secretPtr *[]byte, err error)

func ReadSeed

func ReadSeed() (defaultUser string, protection string, seed *[]byte, err error)

We just use sha3 as the input space is already 512 bits and is impossible to crack

func SatisfyPassword

func SatisfyPassword(passwordDigest *[32]byte, passwordLength uint8, round uint16, unallowedCharacters unallowedCharactersType, passwordDerivationVersion uint16) string

func WriteSeed

func WriteSeed(defaultUser string, protection string, seed *[]byte) error

Types

type IdentificationType

type IdentificationType struct {
	Website                   string
	User                      string
	PasswordLength            uint8 // max 255 otherwise it's ridiculous
	Round                     uint16
	UnallowedCharacters       string
	CreationTime              int64
	PasswordDerivationVersion uint16
	Note                      string
}

func FindIdentification

func FindIdentification(website string, user string) (identification IdentificationType, err error)

func FindIdentificationsByWebsite

func FindIdentificationsByWebsite(website string) (identifications []IdentificationType, err error)

func GetAllIdentifications

func GetAllIdentifications(startTime, endTime int64, user string) (identifications []IdentificationType, err error)

func SearchIdentifications

func SearchIdentifications(query string, searchWebsites, searchUsers bool) (identifications []IdentificationType, err error)

func (*IdentificationType) GenerationParamsEqualTo

func (identification *IdentificationType) GenerationParamsEqualTo(other *IdentificationType) bool

func (*IdentificationType) HasDefaultParams

func (identification *IdentificationType) HasDefaultParams(userIsDefault bool) bool

func (*IdentificationType) ToStrings

func (identification *IdentificationType) ToStrings() []string

Jump to

Keyboard shortcuts

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