A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: XML decryption

  1. #1
    Senior Member rob5150's Avatar
    Join Date
    Nov 2000
    Posts
    150

    XML decryption

    Not even sure this is possible. Can I encrypt an XML file with another program. Then add the decryption key hard coded in flash, load the XML file and then decrypt it within Flash? Man, if this can't be done it should be added as a new feature of securing data on a CD. That way a client can't take all your hard work and edit it without paying for the changes.

    TIA,
    Rob

  2. #2
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    Flash doesn't really have the power to do encryption, however it can create an MD5 checksum.

    If you want to secure the data in the swf file then:

    Work out the MD5 value for your data. When you load the data into flash, reapply the MD5 checksum, then compare.

    Or, why not embed your XML directly into the flash file? Put all your XML into variables, which you store in a include file. The variables will be embedded into the swf at compile time.
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  3. #3
    Senior Member rob5150's Avatar
    Join Date
    Nov 2000
    Posts
    150
    No need for flash to encrypt I need it to decrypt. I want to encrypt an external XML file, load the raw data into flash then decrypt it within flash. Then distribute nodes as needed.

    I don't want to embed the data in flash. Updates are easier with the data outside of the player. I've found a function in MM forums for the decryption portion within flash. I'm still trying to find something that will encrypt in the proper format. I need a base64 encryptor tool.

  4. #4
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    Sorry, I don't call base64 encrypted. I was thinking you were after an encrption routine such as DES etc.

    You are going to have to change your flash file with each new version of your data anyway, why not compile them into the flash movie? They will still be set as an external file?
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  5. #5
    Senior Member rob5150's Avatar
    Join Date
    Nov 2000
    Posts
    150
    Well then that just shows my lack of understanding on the subject. I couldn't say either way if base64 is encryption or not. I assumed it was.

    If you add the data to the flash file you loose the ability to make quick changes from an external file. Are we understanding eadh other correctly?

    If it is done right you shouldn't ever have to touch the flash file again. As it stands now the CD I made, all the data is pulled from the XML file. Including references to images. If I need to make an entirely new product line I just create a new XML file.

    The thing that concerns me the most about doing that is if the client ever became aware they could manipulate that file on their own they could bypass me for edits, aka less $ for me and the company I work for. But by far it's a better way of doing things.

    So far, I haven't found anything that can do this reliably. I send the idea into MM. Hopefully they'll build that into the next version. For now I think the best thing I can do is make the external files hidden on the CD.

  6. #6
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    Base64 is a binary encoding mechanism. Basically takes binary data and makes it look as though it is text. It is not readable to the human (except really freaky people) but it is easily decoded.

    Hidden files will be all that it is needed, although I still think that adding the files as an included text file and recompiling will give you the same results .
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  7. #7
    Junior Member
    Join Date
    Apr 2003
    Posts
    2
    There is a simple solution for this without encrypting. You can just change the file name and extension to something like image01.jpg. If a user tries to open it, there would be an error but flash will still be able to read the XML from this file. The only problem with this is that if your client is smart enough to browse through all files in the CD and change each extension to XML to find the correct one.

  8. #8
    Senior Member rob5150's Avatar
    Join Date
    Nov 2000
    Posts
    150
    That is very intriguing. I'll definately have to try that. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center