From e45724e771d63df44921c6d6b6772304dac76e18 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 30 Oct 2020 00:02:56 -0400 Subject: [PATCH] shrink function signature --- encryption.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/encryption.go b/encryption.go index 93cd4de..26010fd 100644 --- a/encryption.go +++ b/encryption.go @@ -64,10 +64,10 @@ func DecryptWithPrivateKeyString(privateKey, data string) (string, error) { } // EncryptShared will encrypt data and provide shared keys for decryption -func EncryptShared(user1PrivateKey *bsvec.PrivateKey, user2PrivateKey *bsvec.PublicKey, data []byte) (*bsvec.PrivateKey, *bsvec.PublicKey, []byte, error) { +func EncryptShared(u1priv *bsvec.PrivateKey, u2pub *bsvec.PublicKey, in []byte) (*bsvec.PrivateKey, *bsvec.PublicKey, []byte, error) { // Generate shared keys that can be decrypted by either user - sharedPrivKey, sharedPubKey := GenerateSharedKeyPair(user1PrivateKey, user2PrivateKey) + sharedPrivKey, sharedPubKey := GenerateSharedKeyPair(u1priv, u2pub) // Encrypt data with shared key - encryptedData, err := bsvec.Encrypt(sharedPubKey, data) + encryptedData, err := bsvec.Encrypt(sharedPubKey, in) return sharedPrivKey, sharedPubKey, encryptedData, err }