Throw errors instead of panicing

Changed all the panics in the Encrypt method to returning errors
instead. Also updated the tests for this change. This pull request
(mostly) fixes issue #2.

There is still one panic left in the package in the unhash function.
Perhaps this should be changed to returning an error as well.