Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use SHA256 Signing XML algorithm in .NET Framework 4.0

I am trying to sign an XML EBICS file with SHA256 algorithm. I can't use the .Net Framework 4.5 in my project.

In the .NET 4.5 we can write the code below,

CryptoConfig.AddAlgorithm(typeof(RSAPKCS1SHA256SignatureDescription), "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256");

So I've no idea how I can did it in .Net 4.0

Could you help me please?

like image 384
Thomas Rollet Avatar asked Feb 24 '26 00:02

Thomas Rollet


1 Answers

Have a look at CLR Security https://clrsecurity.codeplex.com/wikipage?title=Security.Cryptography.dll&referringTitle=Home

The RSAPKCS1SHA256SignatureDescription class has been implemented in that assembly, built in .NET 3.5, hence must work in .NET 4.0

like image 180
Don Avatar answered Feb 25 '26 16:02

Don