Use NSAssert to validate HMAC items.

Improvement contributed by Gabriel Handford @gabriel.