Is it possible to encrypt data with AES (256 bit) GCM mode in .net framework 4.7?

不打扰是莪最后的温柔 提交于 2019-12-01 04:22:57

This answer reflects the comments from Luke Park, bartonjs, Timo, aand Maarten Bodewes above.

One option is to use the Bouncycastle C# library, which has its own self-contained implementation of AES as well as the GCM mode. Look at the source code for the classes GCMBlockCipher, AesEngine, and AEADParameters.

Another option is to use P/Invoke to manually call BCryptEncrypt.

Finally, note that .NET Core will have support starting in 3.0. The source is already available in github.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!