func NewEmptyPassword() *Password {
	return NewPassword("", "", "", "")
}
NewEmptyPassword creates a empty Password entity
package core
import (
	"crypto/cipher"
	"encoding/json"
	"io"
	"strings"
	"time"
)
const shortIDLength = 7
type passwordInspect struct {
	ID            string
	Category      string
	Account       string
	Password      string
	Site          string
	Tags          []string
	Ext           string
	CreatedAt     string
	LastUpdatedAt string
}
type PasswordBasic struct {
	Category string `cli:"c,category" usage:"Category of password"`
	PlainAccount  string `json:"-" cli:"u,account" usage:"Account of password"`
	PlainPassword string `json:"-" cli:"-"`
	Site string `cli:"site" usage:"Website of password"`
	Tags []string `cli:"tag" usage:"Tags of password"`
	Ext string `cli:"-"`
	Hidden bool `cli:"H,hidden" usage:"Whether to hide the password" dft:"false"`
}
type Password struct {
	PasswordBasic
	ID string `cli:"id" usage:"Password id for updating"`
	AccountIV  []byte `cli:"-"`
	PasswordIV []byte `cli:"-"`
	CipherAccount  []byte `cli:"-"`
	CipherPassword []byte `cli:"-"`
	CreatedAt int64 `cli:"-"`
	LastUpdatedAt int64 `cli:"-"`
}
var passwordHeader = []string{"ID", "CATEGORY", "ACCOUNT", "PASSWORD", "UPDATED_AT"}
func (pw Password) get(i int) string {
	switch i {
	case 0:
		return pw.ShortID()
	case 1:
		return pw.Category
	case 2:
		return pw.PlainAccount
	case 3:
		return pw.PlainPassword
	case 4:
		return time.Unix(pw.LastUpdatedAt, 0).Format(time.RFC3339)
	}
	panic("unreachable")
}
func (pw Password) colCount() int {
	return 5
}
func (pw Password) match(word string) bool {
	if strings.Contains(pw.ID, word) {
		return true
	}
	if strings.Contains(pw.Category, word) {
		return true
	}
	if strings.Contains(pw.PlainAccount, word) {
		return true
	}
	if strings.Contains(pw.Site, word) {
		return true
	}
	if pw.Tags != nil {
		for _, tag := range pw.Tags {
			if strings.Contains(tag, word) {
				return true
			}
		}
	}
	return false
}