先是对1的数字签名
using System.IO;
using System.Security.Cryptography;
static void Main(string[] args)
{
HashAlgorithm hash = HashAlgorithm.Create();
byte[] hashBytes = hash.ComputeHash(Encoding.UTF8.GetBytes("1"));
//The value to hold the signed value.
byte[] SignedHashValue;
//Generate a public/private key pair.
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
//Create an RSAPKCS1SignatureFormatter object and pass it the
//RSACryptoServiceProvider to transfer the private key.
RSAPKCS1SignatureFormatter RSAFormatter = new RSAPKCS1SignatureFormatter(RSA);
//Set the hash algorithm to SHA1.
RSAFormatter.SetHashAlgorithm("SHA1");
//Create a signature for HashValue and