Encoding and decoding in Views
In the view's contextual filter, you would need to select 'PHP Code' in the 'Provide a default value'. Then in code you can specify something like:

// get current path
$path = explode('/', current_path());
// make sure the path component exists (replace 1)
if (empty($path[1])) return;
// decode the component (use any function you fancy; replace 1)
return base64_decode($path[1]);


The encoding would happen wherever the link exists. If it is a view, you might need to use a module such as Views PHP in order to rewrite your link.