I have a password-protected rar file with a few text files in it that are not hidden (you can enter the rar file and see its content), i know the password, I edited one text file and it asked me to enter the password twice to confirm, I pasted it, all seemed in order. Now I can't open this one file (says "incorrect password") but the password still works for all the other files. How come?
Yes, every entry in a .rar file can be encrypted with a different password.
To prove this, simply create a .rar archive and protect it with a password.
If we now try to extract that second file, using the first password..
This might not be immediately apparent, but the password given when creating the archive, does not protect the archive itself, it protects every single file individually.
For example, setting a password for an archive does not stop you from adding new files to it.
However, this changes when choosing the Encrypt file names option (which you always should when using encryption with file archives). If you also encrypt the file names, this will encrypt the entire stream (not just the individual file streams).
Yes one RAR file can have multiple passwords.
Just Recall the second password you might have given.