/// <summary> /// Return /// </summary> /// <returns></returns> public static string GetAesKeyAndIv(string aesKey, string aesIv) { RijndaelManaged aesAlg = new RijndaelManaged { IV = RsaService.Decrypt(Convert.FromBase64String(aesIv)), Key = RsaService.Decrypt(Convert.FromBase64String(aesKey)) }; return(Convert.ToBase64String(aesAlg.Key) + "$" + Convert.ToBase64String(aesAlg.IV)); }
private static ICryptoTransform GetAesDecryptor(string aesKey, string aesIv) { RijndaelManaged aesAlg = new RijndaelManaged { IV = RsaService.Decrypt(Convert.FromBase64String(aesIv)), Key = RsaService.Decrypt(Convert.FromBase64String(aesKey)) }; return(aesAlg.CreateDecryptor()); }