实现:
1.c#将xml报文做数字签名发送到java服务,java服务成功验签。
2.c#服务对收到java服务推送的xml报文成功验签。
前提:
1.java服务要求
资料:
1.msdn:xml签名:https://docs.microsoft.com/zh-cn/dotnet/standard/security/how-to-sign-xml-documents-with-digital-signatures
2.msdn:xml验签:https://docs.microsoft.com/zh-cn/dotnet/standard/security/how-to-verify-the-digital-signatures-of-xml-documents
3.csdn讨论帖:https://bbs.csdn.net/topics/392005202
4.C#下解析、生成JAVA的RSA密钥、公钥:https://blog.csdn.net/starfd/article/details/51838589
5.微软对xml加签验签的举例:https://docs.microsoft.com/zh-cn/dotnet/api/system.security.cryptography.xml.signedxml?view=netframework-4.7.2
6.stack overflow对xml sha256签名的讨论帖:https://stackoverflow.com/questions/17258800/c-sharp-support-for-rsa-sha-256-signing-for-individual-xml-elements
http://www.voidcn.com/article/p-ezohxnnk-bty.html
原文地址:https://www.cnblogs.com/heweiquan123/p/10163703.html