Assistance with Public Key Cryptography

Viewed 86

I am trying to make my Server more secure, using public key cryptography. I'm not looking for examples on how this works, I understand it. I need help actually encrypting my strings that i'm sending...

So, currently, I'm simply making a public/private key string by taking the current nano time, and converting it into a hexidecimal string, 20 times.

It makes an output like:

8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df8ebe14df

which is fine.
But how would i encrypt my message, say "hi", with this key? I've tried converting both into binary, and multiplying them, but then i couldnt un-convert them, because to do that, there have to be spaces in the binary number, but to multiply them, there cant be. can anyone help me?

Thanks in advance!

Also, let me know if you need any more info!

2 Answers
Related