public static string Decrypt(Algorithm algorithm, string symmetricKey, string token, string content) { if (algorithm == Algorithm.AES) { content = AES.Decrypt(symmetricKey, content, token); } else if (algorithm == Algorithm.RIJ) { content = RIJ.Decrypt(symmetricKey, content, token); } else if (algorithm == Algorithm.DES) { content = TDES.Decrypt(symmetricKey, content, token); } else { content = string.Empty; } return(content); }
public static string Encrypt(Algorithm algorithm, string symmetricKey, string message, out string IV) { if (algorithm == Algorithm.AES) { return(AES.Encrypt(symmetricKey, message, out IV)); } else if (algorithm == Algorithm.RIJ) { return(RIJ.Encrypt(symmetricKey, message, out IV)); } else if (algorithm == Algorithm.DES) { return(TDES.Encrypt(symmetricKey, message, out IV)); } else { IV = string.Empty; return("Algorithm Issue"); } }