Versions in this module Expand all Collapse all v0 v0.1.32 Sep 12, 2023 Changes in this version + type Encryption struct + DB initdb.DBInterface + DBConfig initdb.DBConfigInterface + DBInitializer initdb.DBInitializer + FI fileutils.FileInterface + FUInitializer fileutils.FUInitializer + FileOps fileutils.FileOperator + GetWrittenData []byte + Log logger.LoggerInterface + Parameters *Parameters + func NewEncryption(dbcfg initdb.DBConfigInterface, dbInitializer initdb.DBInitializer, ...) *Encryption + func (e *Encryption) CreateEncryptionKey(encryptedFilename string, strings []string, encFunc bool) ([]byte, error) + func (e *Encryption) DecryptFile(encryptedFilename string, key []byte, toDisk bool) ([]byte, error) + func (e *Encryption) EncryptFile(filename string, contentData []byte, key []byte) error + func (e *Encryption) SetLogger(log logger.LoggerInterface) + type Parameters struct + CURRENT_VERSION string + PartsDir string + PrefixParts string + Timestamp int64 + func NewParamters(partsDir string, prefixParts string, timestamp int64, currentVersion string) *Parameters + type RealFileOps struct + Enc *Encryption + func (r *RealFileOps) Create(name string) (*os.File, error) + func (r *RealFileOps) Open(name string) (*os.File, error) + func (r *RealFileOps) ReadFile(name string) ([]byte, error) + func (r *RealFileOps) Remove(name string) error + func (r *RealFileOps) WriteDecryptedFile(filename string, key []byte, data []byte, perm os.FileMode) error + func (r *RealFileOps) WriteEncryptedFile(filename string, data []byte, key []byte, perm os.FileMode) error + func (r *RealFileOps) WriteFile(filename string, data []byte, perm os.FileMode) error