Advertisement

基于C/C#的RSA数字签名开发

阅读量:

首先对数字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 

全部评论 (0)

还没有任何评论哟~