- memcpy(buf + 18, fingerprint, sizeof(buf) - 18);
- sha512(buf, sizeof(buf), cookiehash);
- b64encode_urlsafe(cookiehash, cookiehash, 18);
+ memcpy(buf + 18, fingerprint, buflen - 18);
+ sha512(buf, buflen, cookiehash);
+ b64encode_tinc_urlsafe(cookiehash, cookiehash, 18);