/// <summary> /// Initialize new AESEncryptor. /// </summary> /// <param name="password">The password to use for encryption/decryption.</param> /// <param name="encryptionBits">Encryption bits (128,192,256).</param> public AESEncryptor(string password, EBits encryptionBits) { Password = password; EncryptionBits = encryptionBits; var pdb = new Rfc2898DeriveBytes(Password, Salt, 50); AesKey = new AESKey(pdb.GetBytes((int) encryptionBits), pdb.GetBytes((int) EBits.Bits128)); }
void OnSelectTeleportToNinjaVillage() { Console.WriteLine("Attempting to teleport to Ninja Village."); // Properly close out of the mod options and get the game state back together Manager <PauseManager> .Instance.Resume(); Manager <UIManager> .Instance.GetView <OptionScreen>().Close(false); Courier.UI.ModOptionScreen.Close(false); EBits dimension = Manager <DimensionManager> .Instance.currentDimension; //Fade the music out because musiception is annoying Manager <AudioManager> .Instance.FadeMusicVolume(1f, 0f, true); //Load to Ninja Village Manager <ProgressionManager> .Instance.checkpointSaveInfo.loadedLevelPlayerPosition = new Vector2(-153.3f, -56.5f); LevelLoadingInfo levelLoadingInfo = new LevelLoadingInfo("Level_01_NinjaVillage_Build", false, true, LoadSceneMode.Single, ELevelEntranceID.NONE, dimension); Manager <LevelManager> .Instance.LoadLevel(levelLoadingInfo); Console.WriteLine("Teleport to Ninja Village complete."); }