Don't decrypt if there is definitely no nonce
This commit is contained in:
parent
629bd7dd92
commit
814fee772f
1 changed files with 5 additions and 0 deletions
|
@ -51,6 +51,11 @@ func Decrypt(key []byte, src []byte) (dst []byte, err error) {
|
||||||
return src, nil
|
return src, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Corrupt
|
||||||
|
if len(src) < 12 {
|
||||||
|
return src, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Initiate AES
|
// Initiate AES
|
||||||
block, err := aes.NewCipher(key)
|
block, err := aes.NewCipher(key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue