/// <summary> /// 解密(输入16进制解密字符串) /// </summary> public string Decrypt(InOutParaType Encrypt_RPType, Encrypt_Type DecryptType, string DecryptString, string Key, string IV = "") { switch (Encrypt_RPType) { case EncryptionHelper.InOutParaType.Str16: return(Decrypt(DecryptType, DecryptString.Str16_To_Bytes(), Key, IV)); case EncryptionHelper.InOutParaType.Base64: return(Decrypt(DecryptType, Convert.FromBase64String(DecryptString), Key, IV)); default: return(string.Empty); } }
/// <summary> /// 加密(输出16进制加密字符串) /// </summary> public string Encrypt(InOutParaType Encrypt_RPType, Encrypt_Type EncryptType, string EncryptString, string Key = "", string IV = "") { switch (Encrypt_RPType) { case EncryptionHelper.InOutParaType.Str16: return(BitConverter.ToString(Encrypt(EncryptType, EncryptString, Key, IV)).Replace("-", string.Empty).ToUpper()); case EncryptionHelper.InOutParaType.Base64: return(Convert.ToBase64String(Encrypt(EncryptType, EncryptString, Key, IV))); default: return(string.Empty); } }