示例#1
0
 public MapleCrypt(ushort pBuild, byte[] pIV, bool show)
 {
     mBuild = pBuild;
     if ((short)pBuild < 0)
     { // Second one
         pBuild = (ushort)(0xFFFF - pBuild);
     }
     if (pBuild >= 118) // GMS uses random keys since 118!
     {
         mAES.Key = GMSKeys.GetKeyForVersion(pBuild);
     }
     else
     {
         mAES.Key = CryptoKeys.AESKey;
     }
     mAES.Mode    = CipherMode.ECB;
     mAES.Padding = PaddingMode.PKCS7;
     mTransformer = mAES.CreateEncryptor();
     mBuild       = pBuild;
     mIV          = pIV;
     if (show == true)
     {
         Logger.Write(Logger.LogTypes.DataLoad, "GMS Keys Loaded... Key: {0}", mAES.Key.ToString2s());
     }
 }
示例#2
0
        public static void Initialize()
        {
            GMSKeys.Initialize();

            Worlds = new Dictionary <byte, World>();
            Users  = new Dictionary <string, User>();

            Configurate();
            ConnectCenter();
        }
示例#3
0
        public static void Initialize()
        {
            GMSKeys.Initialize();

            Servers = new Dictionary <string, Server>();
            Worlds  = new Dictionary <byte, World>();

            Characters = new Dictionary <int, Character>();

            Configurate();
        }
示例#4
0
        public static void Initialize()
        {
            GMSKeys.Initialize();

            Users      = new Dictionary <string, User>();
            Characters = new Dictionary <int, Character>();
            Scripts    = new Dictionary <ScriptType, Dictionary <string, Type> >();

            Configurate();
            ConnectCenter();
        }