Exemplo n.º 1
0
        public void EncryptFileWithPadding(FST fst, string outputFilename, short contentID, int blockSize)
        {
            using FileStream output = new FileStream(outputFilename, FileMode.Create);

            MemoryStream          input    = new MemoryStream(fst.GetAsData());
            BigEndianMemoryStream ivStream = new BigEndianMemoryStream(0x10);

            ivStream.WriteBigEndian(contentID);
            IV iv = new IV(ivStream.GetBuffer());

            EncryptSingleFile(input, output, fst.GetDataSize(), iv, blockSize);
        }