TEA

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Andreas Mokros
On Wed, 3 Feb 2010 15:00:46 -0200
Cauê Waneck <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?

No, I'm not. I just saw that there are some interesting things up
there. Did you already try some of it?

--
Mockey

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Cauê W.
Not yet, but there's SO many cool stuff there... A modified std lib, Int64, lua target (!), etc... I would like to use some on my next project, and not being on haxelib makes things a little harder..

2010/2/3 Andreas Mokros <[hidden email]>
On Wed, 3 Feb 2010 15:00:46 -0200
Cauê Waneck <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?

No, I'm not. I just saw that there are some interesting things up
there. Did you already try some of it?

--
Mockey

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Russell Weir
Unfortunately, due to time constraints, I have never completed all the porting of Caffeine-hx from Haxe 1.x to 2.x, but I do believe I left the ndlls in a working state wrt crypto.

Most of the cryptography routines are ported, so the XXTea should work just fine, but the project as a whole has never really been completed for use in haxelib.

Cheers
Russell

On Wed, Feb 3, 2010 at 10:35 AM, Cauê Waneck <[hidden email]> wrote:
Not yet, but there's SO many cool stuff there... A modified std lib, Int64, lua target (!), etc... I would like to use some on my next project, and not being on haxelib makes things a little harder..

2010/2/3 Andreas Mokros <[hidden email]>
On Wed, 3 Feb 2010 15:00:46 -0200

Cauê Waneck <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?

No, I'm not. I just saw that there are some interesting things up
there. Did you already try some of it?

--
Mockey

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Andreas Mokros
On Wed, 3 Feb 2010 11:24:17 -0700
Russell Weir <[hidden email]> wrote:
> Unfortunately, due to time constraints, I have never completed all the
> porting of Caffeine-hx from Haxe 1.x to 2.x, but I do believe I left
> the ndlls in a working state wrt crypto.
> Most of the cryptography routines are ported, so the XXTea should
> work just fine, but the project as a whole has never really been
> completed for use in haxelib.

Thanks for the information, Russell. I will have a look at ncrypt when
I have some time...

--
Mockey

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Shelby Moore
In reply to this post by Cauê W.
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Baluta Cristian
After many hours and traces i've succeeded to find the errors, now we have simple TEA encryptor for haxe, it's attached:

On Thu, Feb 4, 2010 at 3:41 AM, Shelby Moore <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org

TEA.hx (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Adrian Cowan
Hi all,

Also if anybody is interested in an XXTEA implementation, I have made one directly from the reference code, I haven't checked for efficiency and I used my own string conversion method (note xxtea actually operates on arrays of ints), but I did release it into the public domain so that anybody could use it, which I saw as the major problem with the other ones I found.

You can find it here: https://github.com/othrayte/DiNeMeter/raw/devel/src/webmonitor/crypto/Tea.hx
but I'm partway through renaming the whole project to it will soon be at: https://github.com/othrayte/DiNeMeter/raw/devel/src/dinemeter/crypto/Tea.hx

Best,
Adrian Cowan (othrayte)

On Sun, Mar 6, 2011 at 12:16 AM, Baluta Cristian <[hidden email]> wrote:
After many hours and traces i've succeeded to find the errors, now we have simple TEA encryptor for haxe, it's attached:


On Thu, Feb 4, 2010 at 3:41 AM, Shelby Moore <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Baluta Cristian
I think you have the same problem as i had and posted today, String.fromCharCode 0 breaks the code, i can't decrypt the crypted string with your xxtea.

On Sat, Mar 5, 2011 at 4:46 PM, Adrian Cowan <[hidden email]> wrote:
Hi all,

Also if anybody is interested in an XXTEA implementation, I have made one directly from the reference code, I haven't checked for efficiency and I used my own string conversion method (note xxtea actually operates on arrays of ints), but I did release it into the public domain so that anybody could use it, which I saw as the major problem with the other ones I found.

You can find it here: https://github.com/othrayte/DiNeMeter/raw/devel/src/webmonitor/crypto/Tea.hx
but I'm partway through renaming the whole project to it will soon be at: https://github.com/othrayte/DiNeMeter/raw/devel/src/dinemeter/crypto/Tea.hx

Best,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 12:16 AM, Baluta Cristian <[hidden email]> wrote:
After many hours and traces i've succeeded to find the errors, now we have simple TEA encryptor for haxe, it's attached:


On Thu, Feb 4, 2010 at 3:41 AM, Shelby Moore <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Adrian Cowan
Hi Baluta,

Could you detail what platform and string combination you are trying to use.

I have been using this code on js, php and possibly cpp (can remember if I tested it); but haven't seen any problems yet.

Thanks,
Adrian Cowan (othrayte)

On Sun, Mar 6, 2011 at 2:13 AM, Baluta Cristian <[hidden email]> wrote:
I think you have the same problem as i had and posted today, String.fromCharCode 0 breaks the code, i can't decrypt the crypted string with your xxtea.


On Sat, Mar 5, 2011 at 4:46 PM, Adrian Cowan <[hidden email]> wrote:
Hi all,

Also if anybody is interested in an XXTEA implementation, I have made one directly from the reference code, I haven't checked for efficiency and I used my own string conversion method (note xxtea actually operates on arrays of ints), but I did release it into the public domain so that anybody could use it, which I saw as the major problem with the other ones I found.

You can find it here: https://github.com/othrayte/DiNeMeter/raw/devel/src/webmonitor/crypto/Tea.hx
but I'm partway through renaming the whole project to it will soon be at: https://github.com/othrayte/DiNeMeter/raw/devel/src/dinemeter/crypto/Tea.hx

Best,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 12:16 AM, Baluta Cristian <[hidden email]> wrote:
After many hours and traces i've succeeded to find the errors, now we have simple TEA encryptor for haxe, it's attached:


On Thu, Feb 4, 2010 at 3:41 AM, Shelby Moore <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Adrian Cowan
Hi again,

Sorry to double post, but after looking over your other post and the encoding page at haxe.org I assume you are trying to use flash and encode a string which contains null chars. I don't think it is even possible for you to encode/decode on flash strings that contain nulls, but one work around would be converting to and from arrays of strings, splitting and combining on null chars. I personally avaoided the problem entirely for the encoded version of each method by outputting a hexadecimal code, and for the keys but using md5 hashes (note on flash these still cant accept null chars, but who puts (or accepts) null chars in keys anyway?.

If you could explain your reason for working with nulls I am happy to help.

Regards,
Adrian Cowan (othrayte)

On Sun, Mar 6, 2011 at 2:59 AM, Adrian Cowan <[hidden email]> wrote:
Hi Baluta,

Could you detail what platform and string combination you are trying to use.

I have been using this code on js, php and possibly cpp (can remember if I tested it); but haven't seen any problems yet.

Thanks,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 2:13 AM, Baluta Cristian <[hidden email]> wrote:
I think you have the same problem as i had and posted today, String.fromCharCode 0 breaks the code, i can't decrypt the crypted string with your xxtea.


On Sat, Mar 5, 2011 at 4:46 PM, Adrian Cowan <[hidden email]> wrote:
Hi all,

Also if anybody is interested in an XXTEA implementation, I have made one directly from the reference code, I haven't checked for efficiency and I used my own string conversion method (note xxtea actually operates on arrays of ints), but I did release it into the public domain so that anybody could use it, which I saw as the major problem with the other ones I found.

You can find it here: https://github.com/othrayte/DiNeMeter/raw/devel/src/webmonitor/crypto/Tea.hx
but I'm partway through renaming the whole project to it will soon be at: https://github.com/othrayte/DiNeMeter/raw/devel/src/dinemeter/crypto/Tea.hx

Best,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 12:16 AM, Baluta Cristian <[hidden email]> wrote:
After many hours and traces i've succeeded to find the errors, now we have simple TEA encryptor for haxe, it's attached:


On Thu, Feb 4, 2010 at 3:41 AM, Shelby Moore <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Baluta Cristian
Yes flash, i didn't tested the other targets, and I don't work with nulls, i have a simple string to encrypt. When i decrypt it creates internally an array with char codes that represent my string, the last 3 elements are 0 but don't know where they are coming from.

On Sat, Mar 5, 2011 at 6:13 PM, Adrian Cowan <[hidden email]> wrote:
Hi again,

Sorry to double post, but after looking over your other post and the encoding page at haxe.org I assume you are trying to use flash and encode a string which contains null chars. I don't think it is even possible for you to encode/decode on flash strings that contain nulls, but one work around would be converting to and from arrays of strings, splitting and combining on null chars. I personally avaoided the problem entirely for the encoded version of each method by outputting a hexadecimal code, and for the keys but using md5 hashes (note on flash these still cant accept null chars, but who puts (or accepts) null chars in keys anyway?.

If you could explain your reason for working with nulls I am happy to help.

Regards,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 2:59 AM, Adrian Cowan <[hidden email]> wrote:
Hi Baluta,

Could you detail what platform and string combination you are trying to use.

I have been using this code on js, php and possibly cpp (can remember if I tested it); but haven't seen any problems yet.

Thanks,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 2:13 AM, Baluta Cristian <[hidden email]> wrote:
I think you have the same problem as i had and posted today, String.fromCharCode 0 breaks the code, i can't decrypt the crypted string with your xxtea.


On Sat, Mar 5, 2011 at 4:46 PM, Adrian Cowan <[hidden email]> wrote:
Hi all,

Also if anybody is interested in an XXTEA implementation, I have made one directly from the reference code, I haven't checked for efficiency and I used my own string conversion method (note xxtea actually operates on arrays of ints), but I did release it into the public domain so that anybody could use it, which I saw as the major problem with the other ones I found.

You can find it here: https://github.com/othrayte/DiNeMeter/raw/devel/src/webmonitor/crypto/Tea.hx
but I'm partway through renaming the whole project to it will soon be at: https://github.com/othrayte/DiNeMeter/raw/devel/src/dinemeter/crypto/Tea.hx

Best,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 12:16 AM, Baluta Cristian <[hidden email]> wrote:
After many hours and traces i've succeeded to find the errors, now we have simple TEA encryptor for haxe, it's attached:


On Thu, Feb 4, 2010 at 3:41 AM, Shelby Moore <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

John Plsek
This is actually XTEA, not TEA?

Also, wont work in Neko target?

as far as the three null chars, XTEA works with 32bit (4 byte) values ... if your string is, for example, 5 bytes, this gets padded out to 8 (2 x 4bytes) ...

On 6 March 2011 03:29, Baluta Cristian <[hidden email]> wrote:
Yes flash, i didn't tested the other targets, and I don't work with nulls, i have a simple string to encrypt. When i decrypt it creates internally an array with char codes that represent my string, the last 3 elements are 0 but don't know where they are coming from.


On Sat, Mar 5, 2011 at 6:13 PM, Adrian Cowan <[hidden email]> wrote:
Hi again,

Sorry to double post, but after looking over your other post and the encoding page at haxe.org I assume you are trying to use flash and encode a string which contains null chars. I don't think it is even possible for you to encode/decode on flash strings that contain nulls, but one work around would be converting to and from arrays of strings, splitting and combining on null chars. I personally avaoided the problem entirely for the encoded version of each method by outputting a hexadecimal code, and for the keys but using md5 hashes (note on flash these still cant accept null chars, but who puts (or accepts) null chars in keys anyway?.

If you could explain your reason for working with nulls I am happy to help.

Regards,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 2:59 AM, Adrian Cowan <[hidden email]> wrote:
Hi Baluta,

Could you detail what platform and string combination you are trying to use.

I have been using this code on js, php and possibly cpp (can remember if I tested it); but haven't seen any problems yet.

Thanks,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 2:13 AM, Baluta Cristian <[hidden email]> wrote:
I think you have the same problem as i had and posted today, String.fromCharCode 0 breaks the code, i can't decrypt the crypted string with your xxtea.


On Sat, Mar 5, 2011 at 4:46 PM, Adrian Cowan <[hidden email]> wrote:
Hi all,

Also if anybody is interested in an XXTEA implementation, I have made one directly from the reference code, I haven't checked for efficiency and I used my own string conversion method (note xxtea actually operates on arrays of ints), but I did release it into the public domain so that anybody could use it, which I saw as the major problem with the other ones I found.

You can find it here: https://github.com/othrayte/DiNeMeter/raw/devel/src/webmonitor/crypto/Tea.hx
but I'm partway through renaming the whole project to it will soon be at: https://github.com/othrayte/DiNeMeter/raw/devel/src/dinemeter/crypto/Tea.hx

Best,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 12:16 AM, Baluta Cristian <[hidden email]> wrote:
After many hours and traces i've succeeded to find the errors, now we have simple TEA encryptor for haxe, it's attached:


On Thu, Feb 4, 2010 at 3:41 AM, Shelby Moore <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org



--
Coming soon - BravoStudio, a complete internet radio/tv solution

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

John Plsek
of course, by XTEA I meant XXTEA

On 6 March 2011 03:37, John Plsek <[hidden email]> wrote:
This is actually XTEA, not TEA?

Also, wont work in Neko target?

as far as the three null chars, XTEA works with 32bit (4 byte) values ... if your string is, for example, 5 bytes, this gets padded out to 8 (2 x 4bytes) ...

On 6 March 2011 03:29, Baluta Cristian <[hidden email]> wrote:
Yes flash, i didn't tested the other targets, and I don't work with nulls, i have a simple string to encrypt. When i decrypt it creates internally an array with char codes that represent my string, the last 3 elements are 0 but don't know where they are coming from.


On Sat, Mar 5, 2011 at 6:13 PM, Adrian Cowan <[hidden email]> wrote:
Hi again,

Sorry to double post, but after looking over your other post and the encoding page at haxe.org I assume you are trying to use flash and encode a string which contains null chars. I don't think it is even possible for you to encode/decode on flash strings that contain nulls, but one work around would be converting to and from arrays of strings, splitting and combining on null chars. I personally avaoided the problem entirely for the encoded version of each method by outputting a hexadecimal code, and for the keys but using md5 hashes (note on flash these still cant accept null chars, but who puts (or accepts) null chars in keys anyway?.

If you could explain your reason for working with nulls I am happy to help.

Regards,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 2:59 AM, Adrian Cowan <[hidden email]> wrote:
Hi Baluta,

Could you detail what platform and string combination you are trying to use.

I have been using this code on js, php and possibly cpp (can remember if I tested it); but haven't seen any problems yet.

Thanks,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 2:13 AM, Baluta Cristian <[hidden email]> wrote:
I think you have the same problem as i had and posted today, String.fromCharCode 0 breaks the code, i can't decrypt the crypted string with your xxtea.


On Sat, Mar 5, 2011 at 4:46 PM, Adrian Cowan <[hidden email]> wrote:
Hi all,

Also if anybody is interested in an XXTEA implementation, I have made one directly from the reference code, I haven't checked for efficiency and I used my own string conversion method (note xxtea actually operates on arrays of ints), but I did release it into the public domain so that anybody could use it, which I saw as the major problem with the other ones I found.

You can find it here: https://github.com/othrayte/DiNeMeter/raw/devel/src/webmonitor/crypto/Tea.hx
but I'm partway through renaming the whole project to it will soon be at: https://github.com/othrayte/DiNeMeter/raw/devel/src/dinemeter/crypto/Tea.hx

Best,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 12:16 AM, Baluta Cristian <[hidden email]> wrote:
After many hours and traces i've succeeded to find the errors, now we have simple TEA encryptor for haxe, it's attached:


On Thu, Feb 4, 2010 at 3:41 AM, Shelby Moore <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org



--
Coming soon - BravoStudio, a complete internet radio/tv solution



--
Coming soon - BravoStudio, a complete internet radio/tv solution

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: TEA

Adrian Cowan
Yeah john is right about the padding.

@Baluta: Sorry I used null, when I meant null char, the char '\0' which is represented by the value 0.

You will always find these extra zeros, after decryption, if it needs padding (they would have been placed there before the encryption). The way to get around this it to simply ignore the zeros, you don't want them as a string ends (on flash and some other targets) at the first null char (0) and anything following is ignored.

Best,
Adrian Cowan (othrayte)

On Sun, Mar 6, 2011 at 3:43 AM, John Plsek <[hidden email]> wrote:
of course, by XTEA I meant XXTEA


On 6 March 2011 03:37, John Plsek <[hidden email]> wrote:
This is actually XTEA, not TEA?

Also, wont work in Neko target?

as far as the three null chars, XTEA works with 32bit (4 byte) values ... if your string is, for example, 5 bytes, this gets padded out to 8 (2 x 4bytes) ...

On 6 March 2011 03:29, Baluta Cristian <[hidden email]> wrote:
Yes flash, i didn't tested the other targets, and I don't work with nulls, i have a simple string to encrypt. When i decrypt it creates internally an array with char codes that represent my string, the last 3 elements are 0 but don't know where they are coming from.


On Sat, Mar 5, 2011 at 6:13 PM, Adrian Cowan <[hidden email]> wrote:
Hi again,

Sorry to double post, but after looking over your other post and the encoding page at haxe.org I assume you are trying to use flash and encode a string which contains null chars. I don't think it is even possible for you to encode/decode on flash strings that contain nulls, but one work around would be converting to and from arrays of strings, splitting and combining on null chars. I personally avaoided the problem entirely for the encoded version of each method by outputting a hexadecimal code, and for the keys but using md5 hashes (note on flash these still cant accept null chars, but who puts (or accepts) null chars in keys anyway?.

If you could explain your reason for working with nulls I am happy to help.

Regards,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 2:59 AM, Adrian Cowan <[hidden email]> wrote:
Hi Baluta,

Could you detail what platform and string combination you are trying to use.

I have been using this code on js, php and possibly cpp (can remember if I tested it); but haven't seen any problems yet.

Thanks,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 2:13 AM, Baluta Cristian <[hidden email]> wrote:
I think you have the same problem as i had and posted today, String.fromCharCode 0 breaks the code, i can't decrypt the crypted string with your xxtea.


On Sat, Mar 5, 2011 at 4:46 PM, Adrian Cowan <[hidden email]> wrote:
Hi all,

Also if anybody is interested in an XXTEA implementation, I have made one directly from the reference code, I haven't checked for efficiency and I used my own string conversion method (note xxtea actually operates on arrays of ints), but I did release it into the public domain so that anybody could use it, which I saw as the major problem with the other ones I found.

You can find it here: https://github.com/othrayte/DiNeMeter/raw/devel/src/webmonitor/crypto/Tea.hx
but I'm partway through renaming the whole project to it will soon be at: https://github.com/othrayte/DiNeMeter/raw/devel/src/dinemeter/crypto/Tea.hx

Best,
Adrian Cowan (othrayte)


On Sun, Mar 6, 2011 at 12:16 AM, Baluta Cristian <[hidden email]> wrote:
After many hours and traces i've succeeded to find the errors, now we have simple TEA encryptor for haxe, it's attached:


On Thu, Feb 4, 2010 at 3:41 AM, Shelby Moore <[hidden email]> wrote:
> Andreas, are you on the caffeine-hx development team?
> I have a request (sorry for the off-topic): please upload it to haxelib!!!
> It would be so much easier to use them in projects!

Maybe we need an easy way to share distributed code:

http://lists.motion-twin.com/pipermail/haxe/2010-February/033408.html

--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

--
haXe - an open source web programming language
http://haxe.org



--
Coming soon - BravoStudio, a complete internet radio/tv solution



--
Coming soon - BravoStudio, a complete internet radio/tv solution

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
12