Versions in this module Expand all Collapse all v0 v0.2.9 Sep 18, 2023 Changes in this version + func DecryptWithAES(dek []byte, encryptedFilePath string, decryptedFilePath string) error + func DecryptWithChacha20poly1305(dek []byte, encryptedFilePath string, decryptedFilePath string) error + func DecryptWithEcies(privkey *ecies.PrivateKey, msg []byte) ([]byte, error) + func DecryptWithRSA(payload []byte, key *rsa.PrivateKey) ([]byte, error) + func DigestString(s string) string + func EciesGenerateKeyPair() *ecies.PrivateKey + func EncryptWithAES(dek []byte, filePath string, encryptedFilePath string) error + func EncryptWithChacha20poly1305(dek []byte, filePath string, encryptedFilePath string) error + func EncryptWithEcies(pubkey *ecies.PublicKey, msg []byte) ([]byte, error) + func EncryptWithRSA(payload []byte, key *rsa.PublicKey) ([]byte, error) + func GenerateFileName(timestamp int64, operationType string, extenstion string) string + func GenerateUuid() string + func GetIdRsa() *rsa.PrivateKey + func GetIdRsaFromStr(keyStr string) *rsa.PrivateKey + func GetIdRsaPub() *rsa.PublicKey + func GetIdRsaPubFromStr(keyStr string) *rsa.PublicKey + func GetIdRsaPubStr() string + func GetIdRsaStr() string + func GetVirtualMemory() uint64 + func InitCrypto() + func NewPrivateKeyFromHex(s string) *ecies.PrivateKey + func NewPublicKeyFromHex(s string) *ecies.PublicKey + func ReadFile(fileName string) ([]byte, error) + func ReadKeyFile(filePath string) string