Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Amazon SimpleDB

Elanthius Flagstaff
Registered User
Join date: 30 Apr 2006
Posts: 1,534
06-04-2009 07:34
Has anyone ever got this http://aws.amazon.com/simpledb/ working in LSL? It seems like it would be wicked awesome although sorta pointless.

I gave it a very feeble shot but got stuck right at the first hurdle when it come to generating the HMAC-SHA signature.
_____________________
Visit http://ninjaland.net for mainland and covenant rentals or visit our amazing land store at Steamboat (199, 56).

Also, we pay L$0.15/sqm/week for tier donated to our group and we rent pure tier to your group for L$0.25/sqm/week.

Free L$ for Everyone - http://ninjaland.net/tools/search-scumming/
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
06-04-2009 09:04
You may want to look at this post I did for a Dynamic DNS service.

/54/33/323981/1.html

Although it was intended for DNS, the reality is it's just storing strings. So you can use it to store any kind of string data, not just URLS. It could be a good starting point for such a project.

Only thing is it uses Google App Engine, not Amazon's service.
_____________________
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
06-04-2009 11:15
Implementing HMAC in LSL is possible.

The main issue is that generation of the ipad/opad requires a sha1 hash function that can deal with non-printable ascii bytes. If memory serves, I believe Strife has open-sourced an implementation of SHA1 that does this.

The second issue is that you need to be careful to feed in a big-endian (NBO) binary version of the message into HMAC

The third issue is that you need to implement a way to turn a binary (list of bytes) into base64).

The functions built in to LSL won't help you with any of the above.

A final note: given the nature of SL security (or lack thereof) you should consider whether introducing your AWS SDB secret key into SL is a good idea.

/esc
_____________________
http://slurl.com/secondlife/Together
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-04-2009 16:18
I seriously need to Jira a request for llString2IntegerList or something... we need a way to convert between character codes and integers (and BACK)even UUEncodeALL would be an improvement.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
06-05-2009 12:32
From: Void Singer
I seriously need to Jira a request for llString2IntegerList or something... we need a way to convert between character codes and integers (and BACK)even UUEncodeALL would be an improvement.

This sounds like an opportunity for Strife to write some inadvisedly optimized LSL.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
06-05-2009 15:12
If you do - string2integerlist is not the same as string to binary... :)

meaning...

// For XXTEA compatibility use LITTLE ENDIAN, for HMAC use BIG ENDIAN
list string2binary(string s, integer bigendian) {
list binary = [];
integer index;
integer length = llStringLength(s);
if (length > 0) {
for (index = 0; index < length; index += 4) {
binary += char2ascii(llGetSubString(s, index, index))
| char2ascii(llGetSubString(s, index + 1, index + 1)) << 8
| char2ascii(llGetSubString(s, index + 2, index + 2)) << 16
| char2ascii(llGetSubString(s, index + 3, index + 3)) << 24;
}
} else {
binary = [0];
}
if (bigendian) {
binary = reverse_endian(binary);
}
return binary;
}

...etc.
_____________________
http://slurl.com/secondlife/Together
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-05-2009 17:13
From: Escort DeFarge
If you do - string2integerlist is not the same as string to binary... :)

meaning...

// For XXTEA compatibility use LITTLE ENDIAN, for HMAC use BIG ENDIAN
list string2binary(string s, integer bigendian) {
list binary = [];
integer index;
integer length = llStringLength(s);
if (length > 0) {
for (index = 0; index < length; index += 4) {
binary += char2ascii(llGetSubString(s, index, index))
| char2ascii(llGetSubString(s, index + 1, index + 1)) << 8
| char2ascii(llGetSubString(s, index + 2, index + 2)) << 16
| char2ascii(llGetSubString(s, index + 3, index + 3)) << 24;
}
} else {
binary = [0];
}
if (bigendian) {
binary = reverse_endian(binary);
}
return binary;
}

...etc.

true (which is why I didn't say binary... but it points out that any function should probably have a boolean switch to spitout/take in numbers that are either LE or BE
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
06-06-2009 18:03
I took it to mean that what was wanted was a list of Unicode character codes.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
06-06-2009 19:54
From: Strife Onizuka
I took it to mean that what was wanted was a list of Unicode character codes.


Good luck with that :)

regs,
/esc
_____________________
http://slurl.com/secondlife/Together
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-07-2009 03:09
From: Strife Onizuka
I took it to mean that what was wanted was a list of Unicode character codes.

I suppose you could do it that way... but wouldn't you then have to pad them out? and then wouldn't you have to strip out the padding (or can you get away with ignoring it)?

eh I know how much you love bit manipulations... have fun =)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
06-08-2009 19:14
An inworld example has been done. You can find the detail here on where to get the script and how to use it.
http://solutions.amazonwebservices.com/connect/thread.jspa?messageID=129536&tstart=0
Reply #8 has the details.