Initial implementation and spec tests.

See also this comment by Drew, which is why I added this in the first place: 
https://github.com/sheax0r/enc/pull/1#discussion-diff-22109715