Documentation
¶
Index ¶
- Constants
- func Decrypt(encrypted []byte, ciphBlock cipher.Block) []byte
- func Encrypt(plaintext []byte, ciphBlock cipher.Block) []byte
- func KeyGeneration(password string) (cipher.Block, string)
- func ReadFromFile(entries *[]Entry, ciphBlock cipher.Block) string
- func WriteToFile(entries []Entry, ciphBlock cipher.Block) string
- type Entry
- type Field
Constants ¶
const FileName = "pass.yaml"
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Input: the encrypted slice and a cipher block made from the same original password. Return: a decrypted slice. Decrypts the encrypted bytes using the cipher block If the decryption failed (wrong password), nonsense will be returned.
func Encrypt ¶
Input: the plaintext slice and a cipher block. Return: the encrypted bytes. Encrypts a slice of bytes using the cipher block (from the key)
func KeyGeneration ¶
Input: the user's password. Output: cipher block made from a key from the password. If the following function is changed, also change it in changeKey.go
func ReadFromFile ¶ added in v1.3.0
Input: entries slice to write into and cipher block from the master password Return: an error string, empty "" if no error
Types ¶
type Entry ¶ added in v1.3.0
type Entry struct {
Name string
Tags string
Usernames []Field
Passwords []Field
SecurityQ []Field
// notes is 6 because that looks the best in /new as individual inputs,
// textArea has unpredictable copy and pasting
Notes [6]string
Circulate bool
Urls []string
Created time.Time
Modified time.Time
Opened time.Time
}
An entry represents an account or site