/* * main() : Entry point */ int main(int argc, char *argv[]) { if (argc < 2 || strcmp(argv[1], "-?") == 0) { /* Print usage */ return printusage(); } if (strcmp(argv[1], "-s") == 0) { /* Hash string */ return hashstring(argv[2]); } if (strcmp(argv[1], "-t") == 0) { /* Time trial */ return timetrial(); } if (strcmp(argv[1], "-x") == 0) { /* Test suite */ return testsuite(); } /* Hash file */ return hashfile(argv[1]); }
void read_hashes() { QFile hashfile(QString(system_default_directory()).append("/hashes")); if (hashfile.open(QIODevice::ReadOnly)) { QDataStream stream(&hashfile); stream >> localFilenameOf; hashfile.close(); }