using Org.BouncyCastle.Crypto.Digests;
using Org.BouncyCastle.Utilities.Encoders;

//加密
byte[] msg = Encoding.Default.GetBytes(secret);
byte[] md = new byte[32];
SM3Digest sm3 = new SM3Digest();
sm3.BlockUpdate(msg, 0, msg.Length);
sm3.DoFinal(md, 0);
string PasswdDigest = new UTF8Encoding().GetString(Hex.Encode(md));

相关文章:

  • 2022-12-23
  • 2021-06-04
  • 2023-03-11
  • 2022-12-23
  • 2021-09-13
  • 2021-05-27
  • 2021-08-26
猜你喜欢
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
相关资源
相似解决方案