Documentation ¶
Index ¶
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptWithAES ¶
func DecryptWithEcies ¶
func DecryptWithEcies(privkey *ecies.PrivateKey, msg []byte) ([]byte, error)
func DecryptWithRSA ¶
func DecryptWithRSA(payload []byte, key *rsa.PrivateKey) ([]byte, error)
func DigestString ¶
func EciesGenerateKeyPair ¶
func EciesGenerateKeyPair() *ecies.PrivateKey
func EncryptWithAES ¶
func GenerateFileName ¶
func GenerateUuid ¶
func GenerateUuid() string
func GetIdRsa ¶
func GetIdRsa() *rsa.PrivateKey
func GetIdRsaFromStr ¶
func GetIdRsaFromStr(keyStr string) *rsa.PrivateKey
func GetIdRsaPub ¶
func GetIdRsaPubFromStr ¶
func GetIdRsaPubStr ¶
func GetIdRsaPubStr() string
func GetIdRsaStr ¶
func GetIdRsaStr() string
func GetVirtualMemory ¶
func GetVirtualMemory() uint64
func InitCrypto ¶
func InitCrypto()
func NewPrivateKeyFromHex ¶
func NewPrivateKeyFromHex(s string) *ecies.PrivateKey
func NewPublicKeyFromHex ¶
func ReadKeyFile ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.