Fix panic logic
This commit is contained in:
parent
7ee8da5d3e
commit
4a2f074a3f
|
@ -44,9 +44,10 @@ func Decrypt(key []byte, ciphertext []byte, additionalData []byte) (plaintext []
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
recover()
|
if r := recover(); r != nil {
|
||||||
err = errors.New("Recoverd from panic in decrypt")
|
err = errors.New("Recovered from panic in decrypt")
|
||||||
auth = false
|
auth = false
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
plaintext = make([]byte, len(ciphertext))
|
plaintext = make([]byte, len(ciphertext))
|
||||||
|
|
Loading…
Reference in New Issue