I\'m working on a client/server system and I\'m trying to do some basic encryption. When I connect to the server, I send a public key as an escaped string across the socket.
On android, Use Base64.NO_WRAP instead of Base64.DEFAULT
Base64.NO_WRAP
Base64.DEFAULT
@Override protected String encode(byte[] bytes) { return Base64.encodeToString(bytes, Base64.NO_WRAP); }
Instead of Base64.getDecoder() use Base64.getMimeDecoder().
Base64.getDecoder()
Base64.getMimeDecoder()