i didn't post code ....
i just asked a question....
i need a good,encrypted way , that does not use a constant string for the secret key (that is needed for the SecretKeySpec).
i saw that there is the RSA way (keyPair generation) and the MAC way (generate some key too .
the question is : if i generate a key is the machine that does encryption - then in the decrypting machine i won't be able to decrypt it .
i will need the key .
so - what is the better way to generate some random key , but still be able to decrypt it on another machine ? (question mark...:-))