NoamB/sorcery — pull request #339 by mveytsman (2012-09-10 01:06:11+00:00)
Title: Sorcery fails silently and doesn't hash passwords when encryption algorithm is misconfigured

I found that when the value of encryption is set to a string instead of a symbol, Sorcery will fail silently and not hash passwords in the database. Sorcery will also fail silently when configured with an encryption algorithm it doesn't know about.

Specifically, I had a project where I configured Sorcery with a string not a symbol: `user.encryption_algorithm = 'sha1'`. The passwords were left unhashed in the database, and Sorcery gave me no indication that this was the case.

I modified the encryption algorithm switch statement to accept strings as well as symbols and to raise an error if the algorithm is unknown.