[REFACTORING] Add tests for crypto package