You receive a System.Security.Cryptography.CryptographicException when a decryption fails because the key is wrong.
How does one avoid it? Is there a built-in solution that preferably looks like this?
if (someClass.TryDecrypt(encrypted key, out var result)) {
//use result
}
else {
//fail like the world hasn't ended yet.
}