Versions in this module Expand all Collapse all v0 v0.1.1 Dec 21, 2022 Changes in this version + const DEFAULT_BUFFER_SIZE + func ConvertByteArrayToHex(arr []byte) string + func ConvertByteArrayToString(arr []byte) string + func ConvertHexToByteArray(hexa string) ([]byte, error) + func CreateAES256Key() []byte + func FileDecryption(filePath string, aesKey []byte, bufferSize int, fileExtension string) error + func FileEncryption(filePath string, key []byte, bufferSize int, fileExtension string) error + func GetFiles(rootPath string) []string + type AsymmetricEncOptions func(*AsymmetricEncryption) + func WithLoggerForAsymmetricEnc(logger Logger) AsymmetricEncOptions + type AsymmetricEncryption struct + Logger Logger + func NewAssymetricEncryption(args ...AsymmetricEncOptions) (*AsymmetricEncryption, error) + func (asymEnc *AsymmetricEncryption) RSAEncrypt(keyToEncrypt []byte, pubKey string) ([]byte, error) + func (asymEnc *AsymmetricEncryption) RetrieveAndDecryptEncKeyFromFile(filePath string, rsa_private_key_path string) ([]byte, error) + func (asymEnc *AsymmetricEncryption) SaveAsHEXToFile(key []byte, path string, filename string, fileExtension string) (string, error) + type EncOptions func(*FolderEncryption) + func WithBufferSize(size int) EncOptions + func WithEncryptionKey(key []byte) EncOptions + func WithLogger(logger Logger) EncOptions + type FolderEncryption struct + BufferSize int + FileExtension string + Folder string + Logger Logger + SymmetricKey []byte + func NewFolderDecryption(encryptedPath string, opts ...EncOptions) (*FolderEncryption, error) + func NewFolderEncryption(pathToEncrypt string, fileExtension string, opts ...EncOptions) (*FolderEncryption, error) + func (opts *FolderEncryption) DecryptFiles() (int64, error) + func (opts *FolderEncryption) Encrypt() (int64, error) + type Logger interface + Log func(...interface{}) + type LoggerFunc func(...interface{}) + func (f LoggerFunc) Log(args ...interface{})