[update] add hmac encryption & test

Fixes #1