Patterson Consulting, Inc
  • Blog
  • |
  • About
  • |
  • Labs
  • |
  • Published Work
  • |
  • Recent Projects
  • |
  • Presentations
  • |
  • Contact
Patterson Consutling, Inc

    Search


    Category

  • ActionScript
  • Adobe
  • AIR
  • Apollo
  • ColdFusion
  • Conferences
  • ECMAScript
  • Facebook
  • Flash
  • Flex
  • General
  • Javascript/DHTML
  • MN.swf
  • Silverlight
  • Technology
  • XML/XSLT/XML Schema

    Archive

  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • 2004


Using Altova DatabaseSpy with SQLite and AIR

by Danny Patterson on March 18th, 2008

Since I’ve been doing more AIR development lately I’ve had a need to create and modify SQLite databases. I’ve used Microsoft SQL Server and its tools a lot over the years, but I haven’t used a wide variety of database programs. I’ve always been a big fan of Altova’s product line, so I thought I’d check out DatabaseSpy. This is their database editor and I must say I like it a lot. I sugest you try it out. Here is how I got it to work with SQLite:

more…

4 Comments


Compiling XML Data into your SWF

by Danny Patterson on March 11th, 2008

Have you ever wanted to actually compile XML data into your SWF before? I wanted to do this to embed the build version into my Flex appliction. The version was stored in an XML file and updated during the build process. But I wanted the version to actually exist inside the SWF in order to decouple the depandancy on the external XML file at runtime. This way I don’t need to worry about the XML file not loading or getting seperated from the SWF. The version will always be there. Here is a simple example doing this in Flex.

more…

2 Comments


MN.swf Camp Sold Out

by Danny Patterson on March 6th, 2008

MN.swf Camp sold out in less than three days. We had to limit the attendees to 100 because of space limitations, however, we are currently exploring other venue options. If we can secure a larger venue then we will reopen registration. I suggest you sign up for the mailing list on the conference home page so you can be alerted if registration opens again.

MN.swf Camp is a one day conference in Minneapolis focusing on the Flash Platform for programmers. Its being organized by the MN.swf User Group and FlashBelt.

2 Comments


XOR Cipher Encryption in ActionScript 3

by Danny Patterson on March 6th, 2008

I typically use an external XML file in all my applications to store configuration variables outside my compiled SWF file. This allows me to make changes to those variables without needing to recompile the SWF application. This is really helpful if you’re deploying an application to multiple environments (development, staging, production). You can deploy the same application and just have a different XML file in each environment with different values.

The values in the XML file are easily read by anyone using a proxy like Charles or Service Capture. Therefore, I decided to put a simple encryption on the values I didn’t want people to be able to easily read. XOR Cipher encryption is a simple form of two-way encryption using a known key. This key would be compiled into your SWF application. So the only way someone could decrypt your variables would be if they decompiled your SWF or guessed the key. Obviously this solution is not hack proof, but it provides a road block for anyone trying to get at these values.

The following is an ActionScript 3 class that performs this XOR encryption. This encodes/decodes the XOR encrypted value using the Base64Encoder in Flex, so if you want to use this without Flex you’ll need to remove that dependancy. The xor() method performs the XOR encryption against the key. If you run a string through this method it with return and encrypted string, and if you run that encrypted string through this method it will return your original string.

more…

21 Comments


Atom | RSS | © 2008 Patterson Consulting, Inc