I have this RSA encryption code but it doesnt encrypt the whole message its suppose to encrypt. It only encrypts
#include <iostream>
#include <string>
#include <string.h>
using namespace std;
// prime numbers
int p, q;
//compute
int n ;//= p * q;
//totient
int phi;// = (p - 1) * (q - 1);
int e; // not devider of phi;
int d;//= e mod phi;
int main()
{
p = 3;
q = 7;
phi = (q - 1) * (p - 1);
e = 69;
d = (e % phi);
n = p * q;
long long c, dc, m;
string msg, msg2, msg3;
msg = "hallo";
int i;
for(i = 0; i < msg.size(); i++)
{
m = msg[i];
cout<<m;
}
c = m ^ e % d;
cout<<c<<endl;
dc = c ^ d & n;
cout<<char(dc);
}
What am I doing wrong and what can i do to fix it?