for (i = 0; i < saltval_len; ++i)
salt[i] = salter[salt[i] % salter_len];
- tr_sha1 (sha, plain_text, strlen (plain_text), salt, (size_t) saltval_len, NULL);
+ tr_sha1 (sha, plain_text, (int) strlen (plain_text), salt, saltval_len, NULL);
tr_sha1_to_hex (&buf[1], sha);
memcpy (&buf[1 + 2 * SHA_DIGEST_LENGTH], &salt, saltval_len);
buf[1 + 2 * SHA_DIGEST_LENGTH + saltval_len] = '\0';
/* hash pass + salt */
my_ssha1 = tr_malloc (2 * SHA_DIGEST_LENGTH + saltlen + 2);
- tr_sha1 (buf, plain_text, strlen (plain_text), salt, saltlen, NULL);
+ tr_sha1 (buf, plain_text, (int) strlen (plain_text), salt, (int) saltlen, NULL);
tr_sha1_to_hex (&my_ssha1[1], buf);
memcpy (my_ssha1 + 1 + 2 * SHA_DIGEST_LENGTH, salt, saltlen);
my_ssha1[1 + 2 * SHA_DIGEST_LENGTH + saltlen] = '\0';
assert (bufptr - buf == (int)thisPieceSize);
assert (leftInPiece == 0);
- tr_sha1 (walk, buf, thisPieceSize, NULL);
+ tr_sha1 (walk, buf, (int) thisPieceSize, NULL);
walk += SHA_DIGEST_LENGTH;
if (b->abortFlag)
{
size_t len;
char * bstr = tr_variantToStr (infoDict, TR_VARIANT_FMT_BENC, &len);
- tr_sha1 (inf->hash, bstr, len, NULL);
+ tr_sha1 (inf->hash, bstr, (int) len, NULL);
tr_sha1_to_hex (inf->hashString, inf->hash);
if (infoDictLength != NULL)