X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Common%2Frt%20api%2FRTIReader.cpp;h=2215f46af6b27adfca4205276c48722f5f519bac;hb=47c71901e7a97c226c8f1df749e3606d43656f32;hp=374b062b5696ea6fa54144fff99cfd8eb7b87838;hpb=86bbf0fd5ba4e07d3279b4179fd8fc808198eaae;p=freerainbowtables diff --git a/Common/rt api/RTIReader.cpp b/Common/rt api/RTIReader.cpp index 374b062..2215f46 100644 --- a/Common/rt api/RTIReader.cpp +++ b/Common/rt api/RTIReader.cpp @@ -1,3 +1,26 @@ +/* + * freerainbowtables is a project for generating, distributing, and using + * perfect rainbow tables + * + * Copyright 2010, 2011 Martin Westergaard Jørgensen + * Copyright 2010, 2011 James Nobis + * + * This file is part of freerainbowtables. + * + * freerainbowtables is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * freerainbowtables is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with freerainbowtables. If not, see . + */ + #include "RTIReader.h" RTIReader::RTIReader(string Filename) @@ -90,13 +113,13 @@ RTIReader::RTIReader(string Filename) } -int RTIReader::ReadChains(unsigned int &numChains, RainbowChain *pData) +int RTIReader::ReadChains(uint32 &numChains, RainbowChain *pData) { // We HAVE to reset the data to 0x00's or we will get in trouble memset(pData, 0x00, sizeof(RainbowChain) * numChains); unsigned int readChains = 0; unsigned int chainsleft = GetChainsLeft(); - for(UINT4 i = 0; i < m_nIndexSize; i++) + for(uint32 i = 0; i < m_nIndexSize; i++) { if(m_chainPosition + readChains > m_pIndex[i].nFirstChain + m_pIndex[i].nChainCount) // We found the matching index continue; @@ -120,7 +143,7 @@ int RTIReader::ReadChains(unsigned int &numChains, RainbowChain *pData) return 0; } -UINT4 RTIReader::GetChainsLeft() +uint32 RTIReader::GetChainsLeft() { return (GetFileLen(m_pFile) / 8) - m_chainPosition; }