I used this base64 and uriencode on a number
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/core-min.js"></script>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/enc-base64-min.js"></script>
<script>
var num= '1418265869452';
var base64num = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(salt));
var encodeuri = encodeURIComponent(base64num);
</script>
base64 num gives me MTQxODI2NTg2OTQ1Mg==
But actually i also needs to uri encode it after base64 encode
when i tried to encodeURIComponent(base64num) it throwed me an error as follows:
Exception thrown from JavaScript : Error: Malformed UTF-8 data
How to achieve this

salt? And what isnumused for?salttonumand it works fine for me: jsfiddle.net/barmar/nbuapp07