tutorial for digital distribution

Can anyone direct me to a digital distribution tutorial? I'm trying
to create a store that can handle digital products. Any Ideas? I'm
mostly interested in the secure delivery of the goods.

This may be helpful:

http://www.bencurtis.com/archives/2006/11/serving-protected-downloads-with-rails/