Added encrypt example, and updated the interface.