Added some more encryption tests.
Refactored algorithm compatibility tests into shared_examples.