thirdparty

package
v0.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptWithAES

func DecryptWithAES(dek []byte, encryptedFilePath string, decryptedFilePath string) error

func DecryptWithChacha20poly1305

func DecryptWithChacha20poly1305(dek []byte, encryptedFilePath string, decryptedFilePath string) error

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 DigestString(s string) string

func EciesGenerateKeyPair

func EciesGenerateKeyPair() *ecies.PrivateKey

func EncryptWithAES

func EncryptWithAES(dek []byte, filePath string, encryptedFilePath string) error

func EncryptWithChacha20poly1305

func EncryptWithChacha20poly1305(dek []byte, filePath string, encryptedFilePath string) error

func EncryptWithEcies

func EncryptWithEcies(pubkey *ecies.PublicKey, msg []byte) ([]byte, error)

func EncryptWithRSA

func EncryptWithRSA(payload []byte, key *rsa.PublicKey) ([]byte, error)

func GenerateFileName

func GenerateFileName(timestamp int64, operationType string, extenstion string) string

func GenerateUuid

func GenerateUuid() string

func GetIdRsa

func GetIdRsa() *rsa.PrivateKey

func GetIdRsaFromStr

func GetIdRsaFromStr(keyStr string) *rsa.PrivateKey

func GetIdRsaPub

func GetIdRsaPub() *rsa.PublicKey

func GetIdRsaPubFromStr

func GetIdRsaPubFromStr(keyStr string) *rsa.PublicKey

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 NewPublicKeyFromHex(s string) *ecies.PublicKey

func ReadFile

func ReadFile(fileName string) ([]byte, error)

func ReadKeyFile

func ReadKeyFile(filePath string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL