More bug fixes to the encryption
Merge pull request #98 from widagroup/master

More bug fixes to the encryption