no***@uber.usachoice.net (Wiseguy) wrote in news:41********@127.0.0.1:
SonofonoS <so*******@hotmail.com> tried to express: Hi NG.
How do I encrypt a string from a C# application and then be able to
read that string on a java applikation.
Im figuring that I should use something with a public and a private
key, where the public key is with the c# application and the private
key is with the java applikation.
Anyone who can give me a hint how to get it working and which
algorithm to use? Should be one above 128bit.
Are you talking about a message sender and receiver, or simply taking
the encrypted string that is produced under c# and decrypting it under
java?
For RSA type encryption algorithms the key length is arbitrary. Just
note that strong encryption using primes is computationally expensive.
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the
World! >100,000 Newsgroups ---= East/West-Coast Server Farms - Total
Privacy via Encryption =---
Well, now I got it figured... Almost!
I can make the keys with my java applikation. I can encode a string with
a .net public key, and put it in a file on the hd. Then when tryig to
decode the string in the file i just get bad data. Just alot of different
chars! Not the same string that I encoded.
At first I take the string and makes it into a byte[] with
utf8encoding.getBytes()
I then encode that byte[] and put it in a file.
After that i load the bytes from the file into a java byte[] and decode
them with the a cipher object, using the private key.
SonofonoS