drupal

Make uc_file an abstraction.

So, I have this idea to further abstract ubercart uc_file to bascially a "disk file api shell". I was working on project that was using S3, and we wanted to have uc_file serve from S3. The main problem I found was it's reliance on is_file, and is_dir.
So my approach was:

1) Make API calls to modules that can plug into a hook
2) Create a new base module for diskbased files
3) Create a new S3 module to implement for S3.

This is in its infancy as it was whipped up as a proof of concept in a few hours; however, attached is the result.

uc_file:

Generic Cipher and Encryption

Lately I needed to encrypt some data: in this case username, password, and credit card data. It them hit me that there exists. I knew that I'd be reusing the encryption settings, so why not make some external API to do all that work for me so that all I have to do is say: "Hey, encrypt this!", or "Hey, decrypt this!".

Enter the "Cipher" module. It is a basic module that basically gives a developer an API to work with via a class to do basic encryption/description. Here's a little snippet of how it works:

Syndicate content