Do your own homework, dude. I'll give you a little hint.
#include <fstream>
using namespace std;
int main()
{
ifstream infile("indata.txt", ios::in | ios::binary);
ofstream outfile("outdata.txt", ios::out || ios::binary);
char temp;
while(infile)
{
infile.get(temp);
__asm
{
mov bl, temp
rol bl, 3
mov temp, bl
}
outfile.put(temp);
}
infile.close();
outfile.close();
}
That's the encryption part. use ror operator for decryption part.

good luck.