Hex String Definition
Posted: Tue Jul 15, 2014 3:55 am
Forum,
I need to define a 128 bit string to use as a Key for encrypt().
I've defined a Hex string to represent the 128 bits = "C0FB7F4F840BBDC0F3FF1A2E0BA9E179"
The problem is that the string is not interpreted as HEX, but as 8 bit Ascii characters, which is 256 bits.
How do you represent a Hex String in LiveCode. I tried to prefix it with "0x", but that is rejected as to long.
I've tried format(), binaryEncode(), binaryDecode(), but I'm not doing something correctly.
If it cut the string in half, to 16 characters, encrypt works just fine, but that is not the Key that I need to use.
This seems very simple, but I cannot find it documented anywhere, but then I'm probably looking in the wrong place.
Thanks for the help.
I need to define a 128 bit string to use as a Key for encrypt().
I've defined a Hex string to represent the 128 bits = "C0FB7F4F840BBDC0F3FF1A2E0BA9E179"
The problem is that the string is not interpreted as HEX, but as 8 bit Ascii characters, which is 256 bits.
How do you represent a Hex String in LiveCode. I tried to prefix it with "0x", but that is rejected as to long.
I've tried format(), binaryEncode(), binaryDecode(), but I'm not doing something correctly.
If it cut the string in half, to 16 characters, encrypt works just fine, but that is not the Key that I need to use.
This seems very simple, but I cannot find it documented anywhere, but then I'm probably looking in the wrong place.
Thanks for the help.