Versions in this module Expand all Collapse all v1 v1.0.1 Feb 16, 2021 v1.0.0 Jan 20, 2021 Changes in this version + func Base58Decode(input []byte) []byte + func Base58Encode(input []byte) []byte + func CheckDbFileExist(userName string) bool + func DecryptString(source []byte) string + func EncryptString(source string) []byte + func FormatTimestamp(t int64) string + func GenKeyForUserWithPasswd(userName, passwd string) + func GetAppFolderPath() string + func GetAppHome() string + func GetAppName() string + func GetDbBucketName() string + func GetDbFilePath(userName string) string + func GetDbHeadKey() string + func GetDbTailKey() string + func GetHeadDefaultContent() string + func GetPrivateKeyName() string + func GetPrivateKeyPath(userName string) string + func GetPrvKey(userName string) []byte + func GetPubKey(userName string) []byte + func GetPubKeyName() string + func GetPublicKeyPath(userName string) string + func GetTailDefaultContent() string + func GetVersion() string + func RSADecrypt(encryptedSrc []byte, prvKey []byte) (res []byte, err error) + func RSADecryptWithPwd(src []byte, prvKey []byte, pwd string) (res []byte, err error) + func RSAEncrypt(src []byte, pubKey []byte) (res []byte, err error) + func RSAGenKey(bits int) (pubKey, prvKey []byte, err error) + func RSAGenKeyWithPwd(bits int, pwd string) (pubKey, prvKey []byte, err error) + func StringToBytes(str string) []byte + type Data struct + NewData string + type Note struct + Content []byte + ID []byte + NextID []byte + PrevID []byte + Timestamp int64 + func DeserializeNote(data []byte, prvKey []byte, pwd string) *Note + func GetHeadNote() *Note + func GetTailNote() *Note + func NewNote(content string) *Note + func (n *Note) Serialize(pubKey []byte) []byte + func (n *Note) SetID(t time.Time) + func (n *Note) SimpleString() string + func (n *Note) String() string + type NoteBook struct + DB *bolt.DB + Head []byte + Tail []byte + func CreateNewNoteBook(userName, passwd string) *NoteBook + func GetNoteBook(userName string) *NoteBook + func (b *NoteBook) AddNote(note *Note, userName string, pwd string) + func (b *NoteBook) DeleteNotePrefix(id []byte, userName, pwd string) + type NoteIter struct + CurKey []byte + Db *bolt.DB + Passwd string + PrvKey []byte + PubKey []byte + func NewNoteIter(curKey string, db *bolt.DB, userName, pwd string) *NoteIter + func (i *NoteIter) Next() *Note + func (i *NoteIter) Prev() *Note