Documentation ¶
Index ¶
- func CompressAndEncryptFile(filePath string, newFilePath string, sharedKey string)
- func DecryptAndDecompressFile(filePath string, newFilePath string, sharedKey string)
- func DecryptFiles(dir string, sharedKey string)
- func DecryptKey(encryptedKey []byte, privateKey *rsa.PrivateKey) string
- func EncryptFiles(dir string, sharedKey string)
- func EncryptKey(sharedKey string, recvPubKey *rsa.PublicKey) []byte
- func GenerateRSAKeypair() (*rsa.PrivateKey, *rsa.PublicKey)
- func GetKey(sender *transfer.Sender) []byte
- func ReceiverKeyExchange(key *rsa.PublicKey) string
- func SenderKeyExchange(receiverIP string) *rsa.PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressAndEncryptFile ¶
Encrypt given file using the shared key
func DecryptAndDecompressFile ¶
Decrypt given file using the shared key
func DecryptFiles ¶
Decrypt files in given directory using shared key
func DecryptKey ¶
func DecryptKey(encryptedKey []byte, privateKey *rsa.PrivateKey) string
Decrypt shared key using private RSA key
func EncryptFiles ¶
Encrypt files in given directory using shared key
func EncryptKey ¶
Encrypt shared key with received public key
func GenerateRSAKeypair ¶
func GenerateRSAKeypair() (*rsa.PrivateKey, *rsa.PublicKey)
Generate RSA keypair
func ReceiverKeyExchange ¶
Exchange keys with sender
func SenderKeyExchange ¶
Exchange keys with receiver
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.