changed fingerprint function to use hmac as per chiiph advice