[eluser]Unknown[/eluser]
Hi I'm currently working on an extension class for the CI_Input class to use for decrypting data placed in the POST variables of a request. I've got what information I was to use for my key, however it will be stored in a database. If CodeIgniter loads the input class into controllers automatically, what would best practice be to ensure libraries are loaded properly? Also how do I dynamically pass this information to the new input class' constructor before it's instantiated by a controller. Lastly is there a way using the mcrypt system to validate that a key is the one needed to decrypt the request without hand-validating the data after encryption. Basically I'm trying to make an automatic login system for external resources that takes unique information sent by the resource in header format and translates it into an encryption key, it then creates the post data from the encrypted string for processing, or logs the attempts from non-validated sources. Perhaps I'm going about it the wrong way but if every request is encrypted I assumed this was the best course of action.