Skip to content

Commit

Permalink
[bug] return error while error ocurrs in Decrypt() method in crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
dongxuny committed Mar 15, 2022
1 parent 3de52db commit 4e65dc9
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 4e65dc9

Please sign in to comment.