Refactor sign function.
Refactor sign function.

- this commit might affect LOG_DEBUG message,
    since now we log utf8_encode($qs) not $qs.

- this is probably what we want though,
    since we run hash_hmac on the latter.

ahojjati/yubikey-val,Yubico/yubikey-val,ahojjati/yubikey-val,Yubico/yubikey-val,Yubico/yubikey-val,ahojjati/yubikey-val