Colour of a pixel?

John Tregea john at debraneys.com
Thu Jul 13 22:37:12 EDT 2006


Thanks everyone for the pointers, answers and time...

I appreciate it.

Regards

John T

Dar Scott wrote:
>
> On Jul 13, 2006, at 3:04 AM, John Tregea wrote:
>
>> I thought if I could extract the RGB values from pixels in a picture 
>> I could solve my concern about storing a password that may be read by 
>> someone peaking at the source code of a built rev app.
>
> !!
>
> Several people have suggested that you not keep a password in the 
> code.  I have suggested you not keep the complete password in the code 
> if any part at all.
>
>> So I take a short text string
>> repeat through each character in the string
>> convert each character to a number using chartoNum()
>> get the value of that pixel in a particular image ("red" value for 
>> even numbers and "green" value for odd numbers)
>> convert the returned number to a character using numtochar()
>> put the original char and the returned pixel colour (converted to a 
>> character) after a temp string to build up a new string
>> base64encode the new string and use that as my password. :-)
>
> Use MD5, pick off the bytes you need for a key and skip password.  If 
> you really want text, then you can hex or base64encode.
>
> Once you have something, stop and get to the rest of the security 
> problem.
>
> Dar
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list