Added encrypt/decrypt functions.
Added luadoc.