public static string AESEncryptToHex(string input, string key = "", string iv = "") { byte[] byteArr = AESEncrypt(input, key, iv); if (byteArr != null) { return(EncodingHelper.ByteArrToHexDefault(byteArr)); } return(string.Empty); }
public static string MD5ToHex(string input, int bit = 32) { byte[] byteArr = MD5(input); string result = EncodingHelper.ByteArrToHexDefault(byteArr); if (bit == 16) { return(result.Substring(8, 16).ToUpper()); } else { return(result.ToUpper()); } }
public static string HMAC_SHA256ToHex(string encrypt, string key = "") { byte[] hash = HMAC_SHA256(encrypt, key); return(EncodingHelper.ByteArrToHexDefault(hash)); }