/// <summary>
        /// Adds a new file to the container
        /// </summary>
        /// <param name="path"></param>
        public void AddFile(string path)
        {
            if (this.Files.ElementAt(0).Name == "The container is empty")
            {
                this.Files.RemoveAt(0);
            }

            FileInfo info = new FileInfo(path);

            CFile cfile = new CFile {
                Name = info.Name, Length = (int)info.Length, Offset = this.nextOffset, data = AESThenHMAC.SimpleEncryptWithPassword(ReadFileBytes(path), this.Key), Dummy = false
            };

            cfile.Length = cfile.data.Length;

            this.Files.Add(cfile);

            this.Save();

            nextOffset += (int)cfile.Length;

            if (this.addRandomBuffers)
            {
                int randSize = (int)(cfile.Length * (0.05f + new Random().NextDouble() / 10f));
                var data     = AESThenHMAC.SimpleEncryptWithPassword(CreateArrayWithRandomContent(randSize), this.Key);
                var dummy    = new CFile {
                    Name = "", Length = data.Length, Offset = this.nextOffset, data = data, Dummy = true
                };
                this.Files.Add(dummy);
                this.Save();
                nextOffset += (int)dummy.Length;
            }
        }
        /// <summary>
        /// Removes a file from the container at the specified index.
        /// </summary>
        /// <param name="index"></param>
        public void RemoveFile(int index)
        {
            this.Files.RemoveAt(index);

            for (int i = 1; i < this.Files.Count; i++)
            {
                this.Files[i].Offset = this.Files[i - 1].Offset + this.Files[i - 1].Length;
            }

            if (this.Files.Count == 0)
            {
                CFile cfile = new CFile {
                    Name = "The container is empty", Length = 0, Offset = 0, data = AESThenHMAC.SimpleEncryptWithPassword(GetBytes("empty"), this.Key), Dummy = false
                };
                cfile.Length = 0;

                this.Files.Add(cfile);
            }
            this.Save();

            if (this.addRandomBuffers)
            {
                RemoveDummy(index);
            }
        }
        /// <summary>
        /// Creates a new container
        /// </summary>
        /// <param name="filename"></param>
        public void Create(string filename, bool createHidden = false, string hiddenKey = null)
        {
            using (FileStream fs = File.Create(filename)){ }

            this.Path = filename;

            if (hiddenKey == null)
            {
                hiddenKey = RandomString(32);
            }

            this.header2 = AESThenHMAC.SimpleEncryptWithPassword(GetBytes("empty"), hiddenKey);


            CFile cfile = new CFile {
                Name = "The container is empty", Length = 0, Offset = 0, data = AESThenHMAC.SimpleEncryptWithPassword(GetBytes("empty"), this.Key), Dummy = false
            };

            cfile.Length = 0;

            this.Files.Add(cfile);

            this.Save();
        }