Versions in this module Expand all Collapse all v0 v0.1.2 Sep 16, 2025 Changes in this version + type FileService struct + App *pocketbase.PocketBase + Encryption *Service + func NewFileService(app *pocketbase.PocketBase, encryption *Service) *FileService + func (f *FileService) DeleteEncryptedFile(phrase string) error + func (f *FileService) RetrieveDecryptedFile(phrase string) ([]byte, string, string, error) + func (f *FileService) StoreEncryptedFile(phrase string, file multipart.File, filename, contentType string) (string, error) + type Note struct + Created time.Time + ID string + ImageHash string + Message string + Phrase string + Updated time.Time + type NoteService struct + App *pocketbase.PocketBase + Encryption *Service + func NewNoteService(app *pocketbase.PocketBase, encryption *Service) *NoteService + func (n *NoteService) DeleteNote(phrase string) error + func (n *NoteService) GetOrCreateNote(phrase string) (*Note, error) + func (n *NoteService) UpdateNote(phrase, message string) (*Note, error) + func (n *NoteService) UpdateNoteImageHash(phrase, imageHash string) error + type Service struct + KeySize int + SaltSize int + func NewEncryptionService() *Service + func (s *Service) DecryptData(encryptedData []byte, phrase string) ([]byte, error) + func (s *Service) DecryptString(encryptedText string, phrase string) (string, error) + func (s *Service) DeriveKey(phrase string, salt []byte) []byte + func (s *Service) EncryptData(data []byte, phrase string) ([]byte, error) + func (s *Service) EncryptString(text string, phrase string) (string, error)