GLBasic forum

Main forum => GLBasic - en => Topic started by: MrTAToad on 2011-Mar-03

Title: Strange ENCRYPT$ problem?
Post by: MrTAToad on 2011-Mar-03
I'm using the following on two different Win 7 machines, and get different results

Code (glbasic) Select
temp$=ENCRYPT$("wibble","abc")

Produces 5816c9261fef47ce on one machine and 7e38abe946b0a710 on another

I presume a different seed value is generated for each run or something...
Title: Re: Strange ENCRYPT$ problem?
Post by: Marmor on 2011-Mar-03
ill get 7e38abe946b0a710342e3f2f807cd2867861a250540ad398c435d6b71996f1c9 in vmware

intel cpu


Title: Re: Strange ENCRYPT$ problem?
Post by: Slydog on 2011-Mar-03
But does 'DECRYPT$()' work with both 'ENCRYPT$()' results?
Title: Re: Strange ENCRYPT$ problem?
Post by: MrTAToad on 2011-Mar-03
Yes, it did...
Title: Re: Strange ENCRYPT$ problem?
Post by: Marmor on 2011-Mar-03
«fishy

intel or amd ?

Title: Re: Strange ENCRYPT$ problem?
Post by: MrTAToad on 2011-Mar-03
Both are, I believe
Title: Re: Strange ENCRYPT$ problem?
Post by: Kitty Hello on 2011-Mar-04
Yes. The buffer is always 8 byte aligned. I'll encode a bit of garbage otherwise. Don't worry. The decrypt is working so you're fine.
Title: Re: Strange ENCRYPT$ problem?
Post by: Kitty Hello on 2011-Mar-07
Yes, it's working cross platform. For a 4 byte buffer it's encrypting the 4 bytes and then 4 garbage bytes. On the decrpyt it gets 8 bytes in return, but knows that the length was 4 bytes and cuts it off.