support TypedArray
improve HMAC.encode