I was wondering if there was a way to make a simple filter (other than ROT13) for passwords so that I can put it through the filter and then save it into a text file so that it is there but not directly. I would need to make one function to filter and then another to un-filter. I just don't know where to start.
Table based comes to mind
That would be where you have a static table known only to the encoder and decoder which modifies the stream. Another idea is XOR (there's a faq)
So I just make a section with a bunch of statements like...
and then in the decoder have it be...
Here's an example
My code is simplified in 2 aspects. One, you would not statically allocate your output like I did, and the input and table will not be the same length. The solution is pretty easy to implement, just have an iterator that bounces back to the begining of the table once you reach the end.
char table  = "randomletters";
char input  = "testinputchar";
char output ;
unsigned int i;
for (i = 0; i < sizeof(input); i++)
output[i] = input[i] + table[i];