I have a VF page that I pass in parameters to such as Contact Id. As such, I don't want people clicking the links to see the actual Id since that doesn't seem very secure.
So I build a simple encrypt/decrypt routine which is what I use in an email merge etc
Blob cipherText = Crypto.encryptWithManagedIV('AES256', getKey(), Blob.valueOf(sLink)); String encodedCipherText = EncodingUtil.convertToHex(cipherText); return EncodingUtil.urlEncode(encodedCipherText,'UTF-8') ;
This works fine, but the generated URL is very long which makes it difficult to copy and share. I know I can use URL shortners but I was wondering if there is a way to make a shorter link that I can still then read with my decryption utility?