Home
last modified time | relevance | path

Searched refs:BT_BLOCK_SIZE (Results 1 – 2 of 2) sorted by relevance

/dports/security/p5-Crypt-RHash/Crypt-RHash-1.00/librhash/
H A Dtorrent.c42 #define BT_BLOCK_SIZE 256 macro
141 if ((ctx->piece_count % BT_BLOCK_SIZE) == 0) { in bt_store_piece_sha1()
142 block = (unsigned char*)malloc(BT_HASH_SIZE * BT_BLOCK_SIZE); in bt_store_piece_sha1()
148 block = (unsigned char*)(ctx->hash_blocks.array[ctx->piece_count / BT_BLOCK_SIZE]); in bt_store_piece_sha1()
151 hash = &block[BT_HASH_SIZE * (ctx->piece_count % BT_BLOCK_SIZE)]; in bt_store_piece_sha1()
361 size -= BT_BLOCK_SIZE, i++) in bt_bencode_pieces()
364 (size < BT_BLOCK_SIZE ? size : BT_BLOCK_SIZE) * BT_HASH_SIZE); in bt_bencode_pieces()
365 p += BT_BLOCK_SIZE * BT_HASH_SIZE; in bt_bencode_pieces()
/dports/security/rhash/RHash-1.4.2/librhash/
H A Dtorrent.c42 #define BT_BLOCK_SIZE 256 macro
43 #define BT_BLOCK_SIZE_IN_BYTES (BT_BLOCK_SIZE * BT_HASH_SIZE)
142 if ((ctx->piece_count % BT_BLOCK_SIZE) == 0) { in bt_store_piece_sha1()
149 block = (unsigned char*)(ctx->hash_blocks.array[ctx->piece_count / BT_BLOCK_SIZE]); in bt_store_piece_sha1()
152 hash = &block[BT_HASH_SIZE * (ctx->piece_count % BT_BLOCK_SIZE)]; in bt_store_piece_sha1()