Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rohenaz committed Oct 30, 2020
1 parent 0add160 commit 1638e25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) (sharedPrivateKey *bsvec.PrivateKey, sharedPublicKey *bsvec.PublicKey, encrypredData []byte, err error) {
func EncryptShared(user1PrivateKey *bsvec.PrivateKey, user2PrivateKey *bsvec.PublicKey, data []byte) (*bsvec.PrivateKey, *bsvec.PublicKey, []byte, error) {
// Generate shared keys that can be decrypted by either user
sharedPrivateKey, sharedPubKey := GenerateSharedKeyPair(user1PrivateKey, user2PrivateKey)
sharedPrivKey, sharedPubKey := GenerateSharedKeyPair(user1PrivateKey, user2PrivateKey)
// Encrypt data with shared key
encrypredData, err = bsvec.Encrypt(sharedPubKey, data)
return
encryptedData, err := bsvec.Encrypt(sharedPubKey, data)
return sharedPrivKey, sharedPubKey, encryptedData, err
}

0 comments on commit 1638e25

Please sign in to comment.