Arrays and custom properties

Dar Scott dsc at swcp.com
Fri Aug 8 00:39:00 EDT 2003


On Thursday, August 7, 2003, at 11:03 PM, Mark Brownell wrote:

> In the last part of the final process for Blowfish:
>
>     put (xL bitAnd 4278190080 ) / 16777216 into zap
>     put numToChar( (zap bitAnd 255) ) after cipherText
>     put numToChar( ((xL bitAnd 16711680) / 65536 ) ) after cipherText
>     put numToChar( (( xL bitAnd 65280 ) / 256 ) ) after cipherText
>     put numToChar( ( xL bitAnd 255 ) ) after cipherText
>     put (xR bitAnd 4278190080 ) / 16777216 into zap
>     put numToChar( (zap bitAnd 255) ) after cipherText
>     put numToChar( ((xR bitAnd 16711680) / 65536 ) ) after cipherText
>     put numToChar( (( xR bitAnd 65280 ) / 256 ) ) after cipherText
>     put numToChar( ( xR bitAnd 255 ) ) after cipherText
>
> xL and xR are 32 bit numbers that could be stored in an array as a 
> custom properties set. Blowfish takes a major speed hit when putting 
> text into the "put ... after cipherText" variable.

I gotta make this quick, so you might have to fix any errors in this.  
I need to take a weekend break.

How about replacing all of the above with this:

   put binaryEncode("NN",xL,xH) after cipherText

> Is there a better way to store these 32 bit numbers than putting them 
> in a stored array?

Arrays might work well, but I'd encrypt as soon as I create them in 
Blowfish.

Dar




More information about the use-livecode mailing list