byte[] SHA256Data = Encoding.UTF8.GetBytes(sign_origin.ToString()); var Sha256 = new SHA256Managed(); byte[] Result = Sha256.ComputeHash(SHA256Data); sign = Convert.ToBase64String(Result);