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

BlackBerry® World™ Development

Reply
New Developer
farossi
Posts: 12
Registered: ‎05-18-2011
My Device: Bold 9700
My Carrier: Bell Mobility

SHA1 and Dynamic Licensing

Having just released my first Blackberry App, there were a few challenges with dynamic licensing I went through that I wanted to make everyone else aware of.

 

I used the PHP SHA1 function with some padded text to generate a unique license key for each unique PIN - something I assumed most people did. To verify the keys when the game is loaded, I used an SHA1 java function I found online. In this way, I was able to verify that the key from App World matches up with the key unique to that phone. Unfortunately for me, it looks like the PHP SHA1 function pads zeroes in some positions while the java version does not, so the license keys never matched and I was left with a cripped app...

 

It's a bit of a newb mistake but either way, just letting anyone else know who might be going through the same problem to pad some zeroes. :smileyvery-happy:

 

How else did people verify their app world key matched their phone key, aside from using an SHA1 algorithm built into their apps?

Please use plain text.