add hmac encode methods

add hmac encode methods