Teaching my friend low-level coding a few months back.  I taught him AES encryption.  The following class is my implementation of AES.