Thursday 25 October 2007

I'm sorry I broke your GETs

Sorry for no updates for a little while. Not, I assure you, due to lack of activity.

I have broken your gets calls / messages /balances for retrieving records - so here is the fix.

Simply add "call:", "message:" or "balance:" to the front of the digest calculation.

So for a call example, in ruby, the digest to use when retrieving call records would be

digest = Digest::SHA1.hexdigest("call:#{@my_username}:#{@my_gadget_key}:#{@secret}")

or if it makes more sense in a javascript snippet, this example would make a digest associated with retrieving message records:

var digestString = "message:" + form.username.value + ":"+ form.gadgetkey.value + ":" + form.secret.value;
form.digest.value = sha1(digestString);

No comments: