sprintf(link, "ed2k://|file|%s|%u|", filename, size);
for (int i = 0; i < 16; i++) {
sprintf(link + strlen(link), "%02X", ((unsigned char*) hash)[i] & 0xff);
sprintf(link, "ed2k://|file|%s|%u|", filename, size);
for (int i = 0; i < 16; i++) {
sprintf(link + strlen(link), "%02X", ((unsigned char*) hash)[i] & 0xff);