title: Cipher to generate URL safe ciphertext without encoding
body: <p>I want to encrypt small serialized data structures (~256 bytes) so I can pass them around (especially in  URLs) safely. My current approach is to use a symmetric block cipher, and then to base 64 encode, then URL encode the cipher text. This yields an encoded cipher text that is (unsurprisingly) quite a bit longer than the original data structure. The length of these encoded ciphers is a bit of a usability problem; ideally I'd like the cipher text to be around the same length as the input text. </p>
  
  <p>Is there a block cipher that can be configured to constrain the values of the output bytes to be in the URL-safe range? I assume there would be a security trade-off involved if there is. </p>