Fixed bug in crypto test.  Improved speed of encoding to and decoding from hex and base64.