I have a piece of code that works fine when encrypting, encryption works but i don't like the characters used in the encrypted string since it has to be passed in a URL, characters I would prefer are a-z, A-Z and 0-9, is this possible?
String key = enc_key;
// Create key and cipher
Key aesKey = new SecretKeySpec(key.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES");
// encrypt the text
cipher.init(Cipher.ENCRYPT_MODE, aesKey);
byte[] encrypted = cipher.doFinal(text.getBytes());
System.out.println(new String(encrypted));
the encrypted string looks like this ò'Ê>‡6?dövNé÷s which is not URL friendly :-(, any suggestions please?