Пример #1
0
        /// <summary>
        /// Decrypts the header of the main volume file, using a provided seed.
        /// </summary>
        /// <param name="headerData"></param>
        /// <param name="seed"></param>
        /// <returns></returns>
        private bool DecryptHeader(Span <byte> headerData, uint seed)
        {
            if (!Keyset.CryptData(headerData, seed))
            {
                return(false);
            }

            Span <uint> blocks = MemoryMarshal.Cast <byte, uint>(headerData);

            Keyset.DecryptBlocks(blocks, blocks);
            return(true);
        }