Use SHA-1 to match the spec
Introduce APDU constants for authentication
Increase the number of credentials to 10
Added terminal certificate verification
Fixed logging, refactoring