You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#include <inttypes.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "rainbowvalue.h"
|
|
|
|
|
|
|
|
#ifndef readBulk
|
|
|
|
#define readBulk
|
|
|
|
|
|
|
|
#define BULKSIZE 20000
|
|
|
|
#define MAXPWSIZE 256 // Max PW size
|
|
|
|
/**
|
|
|
|
* reads bulk from file, file pointer is used as handle so if you read several bulk, dont use file pointer between
|
|
|
|
* if BULKSIZE or EOF is reached, 2000 or number of lines read is returned. Memory must be allocated by caller
|
|
|
|
* @param fptr file pointer
|
|
|
|
* @bulk allocated memory fot bulk
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
size_t getBulk(FILE * fptr, char bulk[BULKSIZE][MAXPWSIZE]);
|
|
|
|
/**
|
|
|
|
* reads bulk of s_rainbowvalues and stores them in rs
|
|
|
|
* @param fptr
|
|
|
|
* @param rs
|
|
|
|
* @return values read
|
|
|
|
*/
|
|
|
|
size_t getHashBulk(FILE *fptr, struct s_rainbowvalue256 rs[BULKSIZE]);
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param fptr
|
|
|
|
* @param rs
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
size_t write_rainbow_bulk(FILE *fptr ,struct s_rainbowvalue256 rs[BULKSIZE] , size_t len);
|
|
|
|
|
|
|
|
#endif
|