Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Posts: 166
Registered: ‎03-04-2011
My Device: Playbook

Encode base64 and MD5 encoding

I'm developing a Blackberry WebWorks OS 5+ application.


I need to encode a string with BASE64, and another one first with MD5 and then BASE64.


Do you know how can I do it with HTML5 and Javascript?

Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Encode base64 and MD5 encoding



Searching Google you could find the ressources you are targeting very fast:



"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
New Member
Posts: 2
Registered: ‎06-24-2013
My Device: z10
My Carrier: mobilis

Re: Encode base64 and MD5 encoding

please visit this site, it may have some js that is used



New Developer
Posts: 4
Registered: ‎05-29-2013
My Device: BB Tablet 10
My Carrier: Cellcom

Re: Encode base64 and MD5 encoding

base64 encoding:

btoa("my string");



MD5 encoding using crypto.js:


<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script>
    var hash = CryptoJS.MD5("Message");




Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Encode base64 and MD5 encoding

Its depressing nobody knows what btoa / atob do around here (BASE64)


The problem with MD5 is that there's no inbuilt support in JS for it


It may be worth changing your specs so you can use gseCrypto and one of the SHA family


Additionally MD5 is easily breakable with a Rainbow table, SHA is far more robust - it's still great for straight hashes though (e.g. has this file changed?) - still use it myself

Click the like button if you find my posts useful!