I want to save email accounts and passwords, which I will have previously encrypted with an algorithm. They need to be saved and read as binaries, with fwite and fread. What I want, is to be able to know if it’s a pass or an email account, saving it between < e > < e > and < u > < u >
For example:
<e> !"§(!"$)Asdn12§(!"§UASD <e>
<u> !"§()!="§ksd!"§KM!"§lkm12 <u>
<e> !"§KMK!M"§asd9i1ikm23ß0 <e>
<u> l,1ö2l3!"§)IQASD=K!"E <u>
how do you suggest should I read the file as binary but be also able to parse it.
Those emails and passes are read by another prog which performs some tasks with them.
If usernames and passwords are always paired I suggest you store the length (in number of bytes) before each username and before each password. This way you can read the length (say a 4 byte integer) and know how long the next username / password record will be. You can then repeat this without worrying about searching for tags that could occur within a username or password.