Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UTF-16 to Base64
Message
De
26/09/2014 09:30:45
 
 
À
25/09/2014 15:12:35
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01608284
Message ID:
01608333
Vues:
28
>>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......
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform