crypto unit test