bc-csharp
bc-csharp copied to clipboard
InvalidCipherTextException: mac check in GCM failed when use BouncyCastle in Unity
Hi, I want to use BouncyCastle in Unity 2019.04.08 with Api compatibility level .NET standard 2.0 or .NET 4.x. when use GcmBlockCipher, I get the following error: InvalidCipherTextException: mac check in GCM failed Org.BouncyCastle.Crypto.Modes.GcmBlockCipher.DoFinal
I tried different versions of BouncyCastle but it did not change: BouncyCastle BouncyCastle.NetCore Portable.BouncyCastle Portable.BouncyCastle-GOST2012
When I run the same code with VS 2015 with .NET Framework 4, the code runs without error.