Add integration tests & Compare MACs in constant time

Fixes bug #12