Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinuhma committed Jul 14, 2022
1 parent 8b144cc commit 8cc4ddb
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions crypto/enclave_encrypt.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package crypto

import (
"fmt"

"crypto/rand"
"github.com/cloudflare/circl/hpke"
"fmt"

"github.com/capeprivacy/cli/attest"
"github.com/cloudflare/circl/hpke"
)

func LocalEncrypt(doc attest.AttestationDoc, plaintext []byte) ([]byte, error) {
Expand All @@ -16,9 +15,9 @@ func LocalEncrypt(doc attest.AttestationDoc, plaintext []byte) ([]byte, error) {
suite := hpke.NewSuite(kemID, kdfID, aeadID)

kemPublicKey, err := kemID.Scheme().UnmarshalBinaryPublicKey(doc.PublicKey)
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}

sender, err := suite.NewSender(kemPublicKey, nil)
if err != nil {
Expand All @@ -34,6 +33,6 @@ func LocalEncrypt(doc attest.AttestationDoc, plaintext []byte) ([]byte, error) {
if err != nil {
return nil, fmt.Errorf("unable to encrypt %s", err)
}

return append(encapsulatedKey, ciphertext...), nil
}

0 comments on commit 8cc4ddb

Please sign in to comment.