diff --git a/Lidgren.Network/Encryption/NetAESEncryption.cs b/Lidgren.Network/Encryption/NetAESEncryption.cs index 5ed5582..bb6eb4d 100644 --- a/Lidgren.Network/Encryption/NetAESEncryption.cs +++ b/Lidgren.Network/Encryption/NetAESEncryption.cs @@ -7,18 +7,30 @@ namespace Lidgren.Network public class NetAESEncryption : NetCryptoProviderBase { public NetAESEncryption(NetPeer peer) +#if UNITY_WEBPLAYER + : base(peer, new RijndaelManaged()) +#else : base(peer, new AesCryptoServiceProvider()) +#endif { } public NetAESEncryption(NetPeer peer, string key) +#if UNITY_WEBPLAYER + : base(peer, new RijndaelManaged()) +#else : base(peer, new AesCryptoServiceProvider()) +#endif { SetKey(key); } public NetAESEncryption(NetPeer peer, byte[] data, int offset, int count) +#if UNITY_WEBPLAYER + : base(peer, new RijndaelManaged()) +#else : base(peer, new AesCryptoServiceProvider()) +#endif { SetKey(data, offset, count); }