Decrypt problem

Mark Smith lists at futilism.com
Sat Aug 1 02:49:15 CDT 2009


Steve, you need to specify whether the key is a "password" or a "key"

encrypt myRawData using blowfish with key (theKey)
or
encrypt myRawData using blowfish with password (theKey)

The main difference, as I understand it, is that if you use "key",  
then the key must be the exact length specified for the used cipher  
(128 bits, for blowfish), so you probably want to use "password".

The same goes for the decryption as well.

Best,

Mark Smith

On 1 Aug 2009, at 06:06, stevex64 wrote:

>
> Hi all,
>
> I have .csv files that I encrypt with one little app that only  
> encrypts. It
> appears to encrypt with no problem. The key is hard-coded in the app.
>
> I have another app that needs to decrypt the .csv files. I have the  
> same key
> hard-coded into this app. But when it tries to decrypt, it gets  
> this error:
>
> error:0606506D:digital envelope routines:EVP_DecryptFinal:wrong  
> final block
> length
>
> The encrypt code is like this:
>
>  put "a1b2c3d4e5f6" into theKey
>    encrypt myRawData using blowfish with (theKey)
>    put the result into rslt
>    if rslt is not empty then
>       beep
>       answer error rslt
>    else
>       put it into mySafeData
>    end if
>
> and the decrypt code like this:
>
> put "a1b2c3d4e5f6" into myK
> decrypt fld "fldDataT" of grp "backgroundItems" of card startCard  
> using
> "blowfish" with (myK)
> put the result into rslt
> if rslt is not empty then
>    beep
>    answer error rslt
> else
>    put it into  fld "fldDataT" of grp "backgroundItems" of card  
> startCard
> end if
>
> Any thoughts?
>
> Thanks,
>
> Steve
> -- 
> View this message in context: http://www.nabble.com/Decrypt-problem- 
> tp24766119p24766119.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> 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