| /netbsd-src/sys/opencrypto/ |
| H A D | xform.c | 96 .blocksize = 4, 105 .blocksize = 8, 114 .blocksize = 8, 123 .blocksize = 8, 132 .blocksize = 8, 141 .blocksize = 8, 150 .blocksize = 16, 159 .blocksize = 1, 168 .blocksize = 16, 177 .blocksize = 16, [all …]
|
| /netbsd-src/crypto/external/bsd/heimdal/dist/lib/krb5/ |
| H A D | crypto-evp.c | 117 size_t i, blocksize; in _krb5_evp_encrypt_cts() local 126 blocksize = EVP_CIPHER_CTX_block_size(c); in _krb5_evp_encrypt_cts() 128 if (len < blocksize) { in _krb5_evp_encrypt_cts() 132 } else if (len == blocksize) { in _krb5_evp_encrypt_cts() 149 i = ((len - 1) / blocksize) * blocksize; in _krb5_evp_encrypt_cts() 151 p += i - blocksize; in _krb5_evp_encrypt_cts() 153 memcpy(ivec2, p, blocksize); in _krb5_evp_encrypt_cts() 156 tmp[i] = p[i + blocksize] ^ ivec2[i]; in _krb5_evp_encrypt_cts() 157 for (; i < blocksize; i++) in _krb5_evp_encrypt_cts() 162 EVP_Cipher(c, p, tmp, blocksize); in _krb5_evp_encrypt_cts() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/providers/implementations/ciphers/ |
| H A D | ciphercommon_block.c | 57 size_t blocksize, in ossl_cipher_fillblock() argument 60 size_t blockmask = ~(blocksize - 1); in ossl_cipher_fillblock() 61 size_t bufremain = blocksize - *buflen; in ossl_cipher_fillblock() 63 assert(*buflen <= blocksize); in ossl_cipher_fillblock() 64 assert(blocksize > 0 && (blocksize & (blocksize - 1)) == 0); in ossl_cipher_fillblock() 80 int ossl_cipher_trailingdata(unsigned char *buf, size_t *buflen, size_t blocksize, in ossl_cipher_trailingdata() argument 86 if (*buflen + *inlen > blocksize) { in ossl_cipher_trailingdata() 99 void ossl_cipher_padblock(unsigned char *buf, size_t *buflen, size_t blocksize) in ossl_cipher_padblock() argument 102 unsigned char pad = (unsigned char)(blocksize - *buflen); in ossl_cipher_padblock() 104 for (i = *buflen; i < blocksize; i++) in ossl_cipher_padblock() [all …]
|
| /netbsd-src/sys/dev/ |
| H A D | cgd_crypto.c | 136 cgd_cipher_aes_cbc_init(size_t keylen, const void *key, size_t *blocksize) in cgd_cipher_aes_cbc_init() argument 140 if (!blocksize) in cgd_cipher_aes_cbc_init() 144 if (*blocksize == (size_t)-1) in cgd_cipher_aes_cbc_init() 145 *blocksize = 128; in cgd_cipher_aes_cbc_init() 146 if (*blocksize != 128) in cgd_cipher_aes_cbc_init() 214 cgd_cipher_aes_xts_init(size_t keylen, const void *xtskey, size_t *blocksize) in cgd_cipher_aes_xts_init() argument 219 if (!blocksize) in cgd_cipher_aes_xts_init() 223 if (*blocksize == (size_t)-1) in cgd_cipher_aes_xts_init() 224 *blocksize = 128; in cgd_cipher_aes_xts_init() 225 if (*blocksize != 128) in cgd_cipher_aes_xts_init() [all …]
|
| /netbsd-src/sbin/swapctl/ |
| H A D | swaplist.c | 60 long blocksize; in list_swap() local 87 blocksize = 1024; in list_swap() 93 blocksize = 1024 * 1024; in list_swap() 97 blocksize = 1024 * 1024 * 1024; in list_swap() 103 header = getbsize(&hlen, &blocksize); in list_swap() 106 blocksize = 1; suff = ""; /* unused */ in list_swap() 135 (long)(dbtoqb(size) / blocksize)); in list_swap() 138 (long)(dbtoqb(inuse) / blocksize), in list_swap() 139 (long)(dbtoqb(size - inuse) / blocksize), in list_swap() 172 (long)(dbtoqb(totalinuse) / blocksize), in list_swap() [all …]
|
| /netbsd-src/external/bsd/libarchive/dist/libarchive/test/ |
| H A D | test_write_format_tar.c | 36 size_t blocksize; in DEFINE_TEST() local 39 for (blocksize = 1; blocksize < 100000; blocksize += blocksize + 3) { in DEFINE_TEST() 47 archive_write_set_bytes_per_block(a, (int)blocksize)); in DEFINE_TEST() 49 archive_write_set_bytes_in_last_block(a, (int)blocksize)); in DEFINE_TEST() 50 assertEqualInt(blocksize, in DEFINE_TEST() 54 assertEqualInt(blocksize, in DEFINE_TEST() 83 failure("blocksize=%zu", blocksize); in DEFINE_TEST() 84 assertEqualInt(((2048 - 1)/blocksize+1)*blocksize, used); in DEFINE_TEST()
|
| H A D | test_write_format_tar_sparse.c | 36 size_t blocksize; in test_1() local 45 for (blocksize = 1; blocksize < 100000; blocksize += blocksize + 3) { in test_1() 53 archive_write_set_bytes_per_block(a, (int)blocksize)); in test_1() 55 archive_write_set_bytes_in_last_block(a, (int)blocksize)); in test_1() 56 assertEqualInt(blocksize, in test_1() 60 assertEqualInt(blocksize, in test_1() 96 failure("blocksize=%zu", blocksize); in test_1() 97 assertEqualInt(((11264 - 1)/blocksize+1)*blocksize, used); in test_1() 179 size_t blocksize = 20 * 512; in test_2() local 194 archive_write_set_bytes_per_block(a, (int)blocksize)); in test_2() [all …]
|
| H A D | test_write_filter_program.c | 36 int blocksize = 1024; in DEFINE_TEST() local 50 blocksize = 1; in DEFINE_TEST() 64 assertA(0 == archive_write_set_bytes_per_block(a, blocksize)); in DEFINE_TEST() 65 assertA(0 == archive_write_set_bytes_in_last_block(a, blocksize)); in DEFINE_TEST() 66 assertA(blocksize == archive_write_get_bytes_in_last_block(a)); in DEFINE_TEST() 68 assertA(blocksize == archive_write_get_bytes_in_last_block(a)); in DEFINE_TEST()
|
| /netbsd-src/usr.sbin/installboot/ |
| H A D | cd9660.c | 68 int rv, blocksize; in cd9660_match() local 94 blocksize = isonum_723((u_char *)ipd.logical_block_size); in cd9660_match() 95 if (blocksize != ISO_DEFAULT_BLOCK_SIZE) { in cd9660_match() 97 blocksize, params->filesystem); in cd9660_match() 101 params->fstype->blocksize = blocksize; in cd9660_match() 114 int rv, blocksize, found; in cd9660_findstage2() local 156 blocksize = isonum_723((u_char *)ipd.logical_block_size); in cd9660_findstage2() 159 loc = (off_t)isonum_733(idr->extent) * blocksize; in cd9660_findstage2() 160 rv = pread(params->fsfd, buf, blocksize, loc); in cd9660_findstage2() 172 for (i = 0; i < blocksize - sizeof(struct iso_directory_record); in cd9660_findstage2() [all …]
|
| H A D | fstypes.c | 93 assert(params->fstype->blocksize != 0); in hardcode_stage2() 104 nblk = s2sb.st_size / params->fstype->blocksize; in hardcode_stage2() 105 if (s2sb.st_size % params->fstype->blocksize != 0) in hardcode_stage2() 109 params->stage2, s2sb.st_size, params->fstype->blocksize, nblk); in hardcode_stage2() 120 i * (params->fstype->blocksize / params->sectorsize); in hardcode_stage2() 121 blocks[i].blocksize = params->fstype->blocksize; in hardcode_stage2() 136 params->fstype->blocksize = 8192; // XXX: hardcode in raw_match()
|
| /netbsd-src/usr.bin/vndcompress/ |
| H A D | vndcompress.c | 68 uint32_t blocksize; /* bytes per block */ member 134 assert(MIN_BLOCKSIZE <= S->blocksize); in vndcompress() 135 assert(S->blocksize <= MAX_BLOCKSIZE); in vndcompress() 146 void *const uncompbuf = malloc(S->blocksize); in vndcompress() 152 void *const compbuf = malloc(2 * (size_t)S->blocksize); in vndcompress() 175 (S->size % S->blocksize) : S->blocksize); in vndcompress() 177 assert(readsize <= S->blocksize); in vndcompress() 193 S->blocksize, readsize, uncompbuf, compbuf); in vndcompress() 309 assert(S->blocksize > 0); in info_signal_handler() 311 const uint64_t nread = ((uint64_t)S->blkno * (uint64_t)S->blocksize); in info_signal_handler() [all …]
|
| H A D | vnduncompress.c | 87 const uint32_t blocksize = be32toh(header.cl2h_blocksize); in vnduncompress() local 92 if (blocksize < MIN_BLOCKSIZE) in vnduncompress() 95 blocksize, (uint32_t)MIN_BLOCKSIZE); in vnduncompress() 97 if (MAX_BLOCKSIZE < blocksize) in vnduncompress() 100 blocksize, (uint32_t)MAX_BLOCKSIZE); in vnduncompress() 102 if ((blocksize % DEV_BSIZE) != 0) in vnduncompress() 105 blocksize, (uint32_t)DEV_BSIZE); in vnduncompress() 145 void *const compbuf = malloc(2 * (size_t)blocksize); in vnduncompress() 150 void *const uncompbuf = malloc(blocksize); in vnduncompress() 179 if ((2 * (size_t)blocksize) <= (end - start)) in vnduncompress() [all …]
|
| /netbsd-src/sys/arch/x68k/stand/installboot/ |
| H A D | installboot.c | 53 size_t blocksize; variable 131 blocksize = label.d_secsize; in checkparttype() 132 if (blocksize < 512) in checkparttype() 133 blocksize = 512; in checkparttype() 134 if (blocksize > MAXBBSIZE) in checkparttype() 136 if (read(fd, bootblock, blocksize) != blocksize) in checkparttype() 146 if ((label.d_partitions[part].p_offset * blocksize < 32768) && in checkparttype() 210 if (merging && blocksize > bboffset && !floppy) in main() 211 bboffset = blocksize; in main() 241 bootprogsize = howmany(bootprogsize+bboffset, blocksize) * blocksize; in main()
|
| /netbsd-src/external/gpl3/binutils.old/dist/gprofng/src/ |
| H A D | DataObject.cc | 88 blocksize = 32 in get_offset_mark() enumerator 93 if (size > blocksize) in get_offset_mark() 95 if (size == blocksize && (offset % blocksize == 0)) in get_offset_mark() 97 if (offset % blocksize == 0) in get_offset_mark() 99 if ((offset + size) % blocksize == 0) in get_offset_mark() 101 if (offset / blocksize == ((offset + size) / blocksize)) in get_offset_mark()
|
| /netbsd-src/external/gpl3/binutils/dist/gprofng/src/ |
| H A D | DataObject.cc | 88 blocksize = 32 in get_offset_mark() enumerator 93 if (size > blocksize) in get_offset_mark() 95 if (size == blocksize && (offset % blocksize == 0)) in get_offset_mark() 97 if (offset % blocksize == 0) in get_offset_mark() 99 if ((offset + size) % blocksize == 0) in get_offset_mark() 101 if (offset / blocksize == ((offset + size) / blocksize)) in get_offset_mark()
|
| /netbsd-src/external/zlib/pigz/dist/zopfli/ |
| H A D | cache.c | 28 void ZopfliInitCache(size_t blocksize, ZopfliLongestMatchCache* lmc) { in ZopfliInitCache() argument 30 lmc->length = (unsigned short*)malloc(sizeof(unsigned short) * blocksize); in ZopfliInitCache() 31 lmc->dist = (unsigned short*)malloc(sizeof(unsigned short) * blocksize); in ZopfliInitCache() 33 lmc->sublen = (unsigned char*)malloc(ZOPFLI_CACHE_LENGTH * 3 * blocksize); in ZopfliInitCache() 37 for (i = 0; i < blocksize; i++) lmc->length[i] = 1; in ZopfliInitCache() 38 for (i = 0; i < blocksize; i++) lmc->dist[i] = 0; in ZopfliInitCache() 39 for (i = 0; i < ZOPFLI_CACHE_LENGTH * blocksize * 3; i++) lmc->sublen[i] = 0; in ZopfliInitCache()
|
| /netbsd-src/sys/fs/nilfs/ |
| H A D | nilfs_subr.c | 92 uint32_t blocksize = nilfsdev->blocksize; in nilfs_calc_mdt_consts() local 94 mdt->entries_per_group = blocksize * 8; /* bits in sector */ in nilfs_calc_mdt_consts() 95 mdt->entries_per_block = blocksize / entry_size; in nilfs_calc_mdt_consts() 100 blocksize / sizeof(struct nilfs_block_group_desc); in nilfs_calc_mdt_consts() 133 int blk2dev = nilfsdev->blocksize / DEV_BSIZE; in nilfs_dev_bread() 135 return bread(nilfsdev->devvp, blocknr * blk2dev, nilfsdev->blocksize, in nilfs_dev_bread() 161 return bread(node->vnode, vblocknr, node->nilfsdev->blocksize, in nilfs_bread() 171 int blocksize = nilfsdev->blocksize; in nilfs_get_segment_log() local 174 KASSERT(len <= blocksize); in nilfs_get_segment_log() 176 if (*offset + len > blocksize) { in nilfs_get_segment_log() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/providers/implementations/kdfs/ |
| H A D | krb5kdf.c | 265 static void n_fold(unsigned char *block, unsigned int blocksize, in n_fold() argument 271 if (constant_len == blocksize) { in n_fold() 277 gcd = blocksize; in n_fold() 286 lcm = blocksize * constant_len / gcd; in n_fold() 289 memset(block, 0, blocksize); in n_fold() 297 b = l % blocksize; in n_fold() 319 for (b = blocksize - 1; b >= 0 && carry != 0; b--) { in n_fold() 363 size_t blocksize; in KRB5KDF() local 396 blocksize = EVP_CIPHER_CTX_get_block_size(ctx); in KRB5KDF() 398 if (constant_len > blocksize) { in KRB5KDF() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/ec/ |
| H A D | ec_mult.c | 39 size_t blocksize; /* block size for wNAF splitting */ member 65 ret->blocksize = 8; /* default */ in ec_pre_comp_new() 417 size_t blocksize = 0, numblocks = 0; /* for wNAF splitting */ in ossl_ec_wNAF_mul() local 481 blocksize = pre_comp->blocksize; in ossl_ec_wNAF_mul() 487 numblocks = (BN_num_bits(scalar) / blocksize) + 1; in ossl_ec_wNAF_mul() 600 if (tmp_len < numblocks * blocksize) { in ossl_ec_wNAF_mul() 604 numblocks = (tmp_len + blocksize - 1) / blocksize; in ossl_ec_wNAF_mul() 619 wNAF_len[i] = blocksize; in ossl_ec_wNAF_mul() 620 if (tmp_len < blocksize) { in ossl_ec_wNAF_mul() 625 tmp_len -= blocksize; in ossl_ec_wNAF_mul() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/ec/ |
| H A D | ec_mult.c | 33 size_t blocksize; /* block size for wNAF splitting */ member 59 ret->blocksize = 8; /* default */ in ec_pre_comp_new() 410 size_t blocksize = 0, numblocks = 0; /* for wNAF splitting */ in ec_wNAF_mul() local 473 blocksize = pre_comp->blocksize; in ec_wNAF_mul() 479 numblocks = (BN_num_bits(scalar) / blocksize) + 1; in ec_wNAF_mul() 592 if (tmp_len < numblocks * blocksize) { in ec_wNAF_mul() 596 numblocks = (tmp_len + blocksize - 1) / blocksize; in ec_wNAF_mul() 611 wNAF_len[i] = blocksize; in ec_wNAF_mul() 612 if (tmp_len < blocksize) { in ec_wNAF_mul() 617 tmp_len -= blocksize; in ec_wNAF_mul() [all …]
|
| /netbsd-src/sys/arch/aarch64/aarch64/ |
| H A D | pmapboot.c | 189 vsize_t blocksize) in tlb_contiguous_p() argument 196 const vaddr_t mask = (blocksize << 4) - 1; in tlb_contiguous_p() 214 pmapboot_enter(vaddr_t va, paddr_t pa, psize_t size, psize_t blocksize, 227 switch (blocksize) { 238 panic("%s: bad blocksize (%" PRIxPSIZE ")", __func__, blocksize); 242 "blocksize=0x%lx, attr=0x%016lx\n", 243 va, pa, size, blocksize, attr); 245 pa &= ~(blocksize - 1); 246 va_end = (va + size + blocksize [all...] |
| /netbsd-src/sys/external/isc/libsodium/dist/test/default/ |
| H A D | sodium_utils.c | 18 size_t blocksize; in main() local 147 blocksize = 1U + randombytes_uniform(100U); in main() 148 bin_padded_maxlen = bin_len + (blocksize - bin_len % blocksize); in main() 153 blocksize, bin_padded_maxlen - 1U) == -1); in main() 155 blocksize, bin_padded_maxlen + 1U) == 0); in main() 157 blocksize, bin_padded_maxlen + 1U) == 0); in main() 161 blocksize, bin_padded_maxlen) == 0); in main() 169 blocksize) == 0); in main()
|
| /netbsd-src/lib/libc/gen/ |
| H A D | getbsize.c | 57 long n, max, mul, blocksize; in __weak_alias() local 104 if ((blocksize = n * mul) < 512) { in __weak_alias() 107 blocksize = n = 512; in __weak_alias() 110 blocksize = n = 512; in __weak_alias() 116 *blocksizep = blocksize; in __weak_alias()
|
| /netbsd-src/external/bsd/liblzf/dist/ |
| H A D | lzf.c | 61 static long blocksize = BLOCKSIZE; variable 182 while ((us = rread (from, &buf1[MAX_HDR_SIZE], blocksize)) > 0) in compress_fd() 456 blocksize = strtoul (p, 0, 0); in main() 457 if (errno || !blocksize || blocksize > MAX_BLOCKSIZE) in main() 458 blocksize = BLOCKSIZE; in main() 495 blocksize = strtoul (optarg, 0, 0); in main() 496 if (errno || !blocksize || blocksize > MAX_BLOCKSIZE) in main() 497 blocksize = BLOCKSIZE; in main()
|
| /netbsd-src/tests/dev/audio/ |
| H A D | audiotest.c | 1532 XP_NE(0, ai.blocksize); in test_open() 1611 XP_NE(0, ai.blocksize); in test_open() 2098 wavsize = ai.blocksize; in DEF() 3105 buflen = ai.blocksize * ai.hiwat; in DEF() 3141 u_int blocksize; in DEF() local 3156 blocksize = 1000; /* 1/8 sec in mulaw,1ch,8000Hz */ in DEF() 3160 ai.blocksize = blocksize; in DEF() 3170 r = IOCTL(fd, AUDIO_SETINFO, &ai, "blocksize=%d", blocksize); in DEF() 3173 if (ai.blocksize != blocksize) { in DEF() 3178 blocksize = ai.blocksize; in DEF() [all …]
|