Beispiel #1
0
 public static byte[] Encrypt(byte[] pubkey, byte[] data)
 {
     byte[] cipher = SM2Util.Encrypt(pubkey, data);
     return(cipher);
 }
Beispiel #2
0
 /// <summary>
 /// 公钥加密
 /// </summary>
 /// <param name="pubkey">公钥</param>
 /// <param name="data">数据</param>
 /// <returns></returns>
 public static byte[] Encrypt(string pubkey, byte[] data)
 {
     byte[] cipher = SM2Util.Encrypt(Hex.Decode(pubkey), data);
     return(cipher);
 }