....

byte out[100];
FileSource keys("c:\\privkey.txt", true, new HexDecoder);       
RSAES_OAEP_SHA_Decryptor rsaPriv(keys);
FileSource pubkeys("c:\\pubkey.txt", true, new HexDecoder);
RSAES_OAEP_SHA_Encryptor rsaPub(pubkeys);

memset(out, 0, 100);
rsaPub.Encrypt(GlobalRNG(), plain, 8, out);

.....

My aim is encryption of a byte array via RSA. I do not want any file or
string source.
Input byte array, ouput encrypted byte array.
The above code gives run time error. I am open to any idea that makes
encryption.
No problem with files that keep keys. I knew it because I made the
encryption via StringSink. Please recorrect my code or rewrite a piece of
code that makes byte array encryption.
Thanks for your effort, best wishes ...
--
View this message in context: 
http://www.nabble.com/Encrypt-byte-array-via-RSA-without-file-or-string-source-t1290052.html#a3432179
Sent from the Crypto++ forum at Nabble.com.

Reply via email to