Skip to content

Commit

Permalink
Merge pull request #47 from dongxuny/master
Browse files Browse the repository at this point in the history
[bug] return error while error ocurrs in Decrypt() method in crypto
  • Loading branch information
dongxuny authored Mar 15, 2022
2 parents cbda3a7 + 4e65dc9 commit b970b1a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions entry/crypto_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"crypto/cipher"
"crypto/rand"
"encoding/json"
"fmt"
"github.com/pkg/errors"
"io"
)
Expand Down Expand Up @@ -85,7 +84,7 @@ func (s *CryptoAESEntry) Encrypt(plaintext []byte) ([]byte, error) {
func (s *CryptoAESEntry) Decrypt(ciphertext []byte) ([]byte, error) {
gcm, err := cipher.NewGCM(s.block)
if err != nil {
fmt.Println(err)
return nil, err
}

nonceSize := gcm.NonceSize()
Expand Down

0 comments on commit b970b1a

Please sign in to comment.