Skip to content

Commit

Permalink
Add safe integer conversion functions
Browse files Browse the repository at this point in the history
  • Loading branch information
omerzi committed Sep 8, 2024
1 parent f630bdf commit f43dda8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/aes_encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func decrypt(ciphertext []byte, key []byte) (string, error) {
return "", errors.New("ciphertext too short")
}

//#nosec G407
nonce, ciphertext := ciphertext[:nonceSize], ciphertext[nonceSize:]
decryptedBytes, err := gcm.Open(nil, nonce, ciphertext, nil)
return string(decryptedBytes), err
Expand Down

0 comments on commit f43dda8

Please sign in to comment.