|
Thanks for your quick response, let me try to clarify my problem.
I have a struct defined as:
Code:
| | struct FEAU_User{
char login[33];
char hashedPassword[33];
}; |
I have a text file containing user information in the following way:
| |
User1 hashedpass1
User2 hashedpass2
User3 hashedpass3
...
|
When I use fscanf on the users file everything works fine. The problem is I want to encrypt the users file, and decrypt it to memory when I launch my program. There should be no unencrypted file on the hard disk. I've been able to decrypt to memory, and now I have a region in memory looking like this:
| |
"User hashedpas1 User2 hashedpass2 User3 hashedPass3..."
|
I then tried to create a FEAU_User* pointer to that memory address, but it didn't work, and I sort of understand why.
Now my problem is either parsing that memory region (which I haven't figured out how to do yet either) or, is there some sort of function of library call I can make that will correctly format that region in memory to be of type FEAU_User? |