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));