cryptography - Include 'timestamp' into hash signature with C# and Compact Framework -
i want create hash , sign xml file in c# , compact framework 3.5. obtain signature of success. now, now, want signature "trusted timestamp" it's generated cmssigner
, pkcs9signingtime
.
my code obtain , sign hash:
sha1 sha1 = new sha1cryptoserviceprovider(); byte[] hash = sha1.computehash(file.readallbytes("myfile.xml")); rsacryptoserviceprovider rsaprov = (rsacryptoserviceprovider)mycert.privatekey; byte[] signature = rsaprov.signdata(hash, cryptoconfig.mapnametooid("sha1"));
is possible include pkcs9signingtime
in signature compact framework?
probably easiest integrate cms library such bouncy castle application.
Comments
Post a Comment