Name: Anonymous 2009-08-11 12:09
I have a programming dilemma.
I want to take a text file full of hashes, email addresses and passwords, parse it, then put it in a new format. The format at the moment is email:md5hash::password. I want to use the boost regular expression library to change it to just email:password. This much will probably be pretty easy. But how should I go about handling the content from the file? I thought I should store the hashes in a multi-dimensional array, rather than in a string, so I can just use a for loop to check every line in the array and convert the hashes. But apparently multidimensional arrays are always defined as const. So there will probably be problems copying over from the file.
How would you do it?
I want to take a text file full of hashes, email addresses and passwords, parse it, then put it in a new format. The format at the moment is email:md5hash::password. I want to use the boost regular expression library to change it to just email:password. This much will probably be pretty easy. But how should I go about handling the content from the file? I thought I should store the hashes in a multi-dimensional array, rather than in a string, so I can just use a for loop to check every line in the array and convert the hashes. But apparently multidimensional arrays are always defined as const. So there will probably be problems copying over from the file.
How would you do it?