Welcome!

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

Reply
Developer
VansFannel
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?

Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Encode base64 and MD5 encoding

Hi.

 

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

 

Regards.


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

Re: Encode base64 and MD5 encoding

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

 

http://www.generaz.com

Please use plain text.
New Developer
aviyehuda
Posts: 4
Registered: ‎05-29-2013
My Device: BB Tablet 10

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>
<script>
    var hash = CryptoJS.MD5("Message");
</script>

 

 

 

Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

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!
Please use plain text.