AES-GCM decrypt a gogo
This commit is contained in:
@@ -35,6 +35,7 @@ func aesDec(key, payload string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
log.Println(gcm.NonceSize())
|
||||
if len(ciphertext) < gcm.NonceSize() {
|
||||
return "", errors.New("short ciphertext")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user