Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UTF-16 to Base64
Message
From
26/09/2014 09:30:45
 
 
To
25/09/2014 15:12:35
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01608284
Message ID:
01608333
Views:
30
>>I'm being lazy here - just knocking off for the day and hoping I've got an answer in the morning :-}
>>
>>I have a C# generated hash (e.g. "100:tCmn+fSqJKJ38XqG:N61/4NEVsRRb4ryG")
>>
>>How, in JavaScript, do I convert that to Base64 ?
>>
>>CryptoJS ?
>
>Client-side?
>
>var hash64 = window.btoa("100:tCmn+fSqJKJ38XqG:N61/4NEVsRRb4ryG");
>alert(hash64);
>
>will display MTAwOnRDbW4rZlNxSktKMzhYcUc6TjYxLzRORVZzUlJiNHJ5Rw==

Thx. Thought I tried that and it didn't work - but it was a bit late in the day and, yes, it works fine.

But then I realized it made more sense to do the conversion on the server before sending it anyway - and probably a bit safer since there's more than one implantation of Base64 conversion out there......
Previous
Reply
Map
View

Click here to load this message in the networking platform