You can use the mcrypt extension. However, if you really expect to have 1MB of data, I think you'd be better off using a database solution if possible, rather than the processing needed to read that size of a file into memory and presumably parse it with [man]simplexml[/man] or such, let alone decrypting it.