// extractSalt : extract the encryption salt stored in the database
extractSalt : extract the encryption salt stored in the database
// extractSalt : extract the encryption salt stored in the database
func (v *Vault) extractSalt() ([]byte, error) {
	f, err := os.OpenFile(v.databaseFilename, os.O_RDONLY, 0)
	if err != nil {
		return []byte{}, errors.Wrap(err, "could not open database")
	}
	defer func() { _ = f.Close() }()
	bytesSalt, err := bufio.NewReader(f).Peek(saltLength)
	if err != nil {
		return []byte{}, errors.Wrap(err, "could not read database salt")
	}
	return bytesSalt, nil
}
func ( v * Vault ) extractSalt ( ) ( [ ] byte , error ) { f , err := os . OpenFile ( v . databaseFilename , os . O_RDONLY , 0 ) if err != nil { return [ ] byte { } , errors . Wrap ( err , " " ) } defer func ( ) { _ = f . Close ( ) } ( ) bytesSalt , err := bufio . NewReader ( f ) . Peek ( saltLength ) if err != nil { return [ ] byte { } , errors . Wrap ( err , " " ) } return bytesSalt , nil }
extractSalt : extract the encryption salt stored in the database
extractSalt : extract the encryption salt stored in the database