diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -143,9 +143,9 @@ void performrsa(){ cout<<"d = "<<privkey.pexp<<endl; Bigint msg(123456789); cout<<"msg = "<<msg<<endl; - Bigint encr=RSA::encrypt(privkey.pub,msg); + Bigint encr=RSA::encrypt(msg,privkey.pub); cout<<"encr = "<<encr<<endl; - Bigint msg2=RSA::decrypt(privkey,encr); + Bigint msg2=RSA::decrypt(encr,privkey); cout<<"msg = "<<msg2<<endl; } |