3 Replies Latest reply on Nov 16, 2009 6:41 AM by R7AF

    Validate xml file authenticity


      I am sending out a standalone player that uses an xml driven image gallery. I need to prevent changes to the xml file to stop images being added to the gallery. I can can password protect the xml file to prevent changes, but I also wondered if there was a way to validate the authenticity of the xml file from within Flash to prevent the entire file being replaced?



        • 1. Re: Validate xml file authenticity

          First of all, if you password encrypt the xml file, and that file is replaced, it probably is not encrypted anymore, or another key is used. That would result in an error, which should be enough to send out a warning to the user.


          As an alternative, you can use an MD5 hash. You use the original XML file to create the hash, and when you read the file the hash should be the same. I don't think that this is any safer or better than your solution. Yeah someone could decompile the movie, replace the hash, but how many of your users will have the knowledge and time to do something like this?

          • 2. Re: Validate xml file authenticity
            Dsotm Level 1

            Thanks for the quick reply - your point on the password protection is useful. Can you point me to a tutorial on the

            implementation of the MD5 hash method - I am fairly new to xml


            Many thanks


            • 3. Re: Validate xml file authenticity
              R7AF Level 1

              I haven't used this myself, but this is what I've found:




              Using this you probably don't need to encrypt the file. But if that works, if it ain't that resource intensive, why bother? Stick with what you have if it works.