| /netbsd-src/sys/external/isc/libsodium/dist/test/default/ |
| H A D | chacha20.c | 29 size_t plen; in tv() local 40 for (plen = 1U; plen < sizeof out; plen++) { in tv() 41 part = (unsigned char *) sodium_malloc(plen); in tv() 42 crypto_stream_chacha20_xor(part, out, plen, nonce, key); in tv() 43 if (memcmp(part, zero, plen) != 0) { in tv() 44 printf("Failed with length %lu\n", (unsigned long) plen); in tv() 50 for (plen = 1U; plen < 66; plen += 3) { in tv() 51 memset(out, (int) (plen & 0xff), sizeof out); in tv() 52 crypto_stream_chacha20(out, plen, nonce, key); in tv() 116 size_t plen; in tv_ietf() local [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/providers/implementations/ciphers/ |
| H A D | cipher_chacha20_poly1305_hw.c | 124 size_t tail, tohash_len, buf_len, plen = ctx->tls_payload_length; in chacha20_poly1305_tls_cipher() local 134 if (plen <= 3 * CHACHA_BLK_SIZE) { in chacha20_poly1305_tls_cipher() 136 buf_len = (plen + 2 * CHACHA_BLK_SIZE - 1) & (0 - CHACHA_BLK_SIZE); in chacha20_poly1305_tls_cipher() 143 ctx->len.text = plen; in chacha20_poly1305_tls_cipher() 145 if (plen) { in chacha20_poly1305_tls_cipher() 147 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 149 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 151 in += plen; in chacha20_poly1305_tls_cipher() 152 out += plen; in chacha20_poly1305_tls_cipher() 157 if (plen <= CHACHA_BLK_SIZE) { in chacha20_poly1305_tls_cipher() [all …]
|
| H A D | cipher_rc4_hmac_md5_hw.c | 61 size_t plen = ctx->payload_length; in cipher_hw_rc4_hmac_md5_cipher() local 63 if (plen != NO_PAYLOAD_LENGTH && len != (plen + MD5_DIGEST_LENGTH)) in cipher_hw_rc4_hmac_md5_cipher() 67 if (plen == NO_PAYLOAD_LENGTH) in cipher_hw_rc4_hmac_md5_cipher() 68 plen = len; in cipher_hw_rc4_hmac_md5_cipher() 74 if (plen > md5_off in cipher_hw_rc4_hmac_md5_cipher() 75 && (blocks = (plen - md5_off) / MD5_CBLOCK) in cipher_hw_rc4_hmac_md5_cipher() 94 MD5_Update(&ctx->md, in + md5_off, plen - md5_off); in cipher_hw_rc4_hmac_md5_cipher() 96 if (plen != len) { /* "TLS" mode of operation */ in cipher_hw_rc4_hmac_md5_cipher() 98 memcpy(out + rc4_off, in + rc4_off, plen - rc4_off); in cipher_hw_rc4_hmac_md5_cipher() 101 MD5_Final(out + plen, &ctx->md); in cipher_hw_rc4_hmac_md5_cipher() [all …]
|
| /netbsd-src/external/gpl3/gcc/dist/gcc/config/avr/ |
| H A D | avr.cc | 2977 avr_asm_len (const char* tpl, rtx* operands, int* plen, int n_words) in avr_asm_len() argument 2979 if (plen == NULL) in avr_asm_len() 2984 *plen = -n_words; in avr_asm_len() 2986 *plen += n_words; in avr_asm_len() 3794 avr_out_lpm_no_lpmx (rtx_insn *insn, rtx *xop, int *plen) in avr_out_lpm_no_lpmx() argument 3821 avr_asm_len ("%4lpm", xop, plen, 1); in avr_out_lpm_no_lpmx() 3824 avr_asm_len ("mov %0,%3", xop, plen, 1); in avr_out_lpm_no_lpmx() 3835 "pop %A0", xop, plen, 6); in avr_out_lpm_no_lpmx() 3841 "mov %B0,%3", xop, plen, 5); in avr_out_lpm_no_lpmx() 3844 avr_asm_len ("sbiw %2,1", xop, plen, 1); in avr_out_lpm_no_lpmx() [all …]
|
| /netbsd-src/external/gpl3/gcc.old/dist/gcc/config/avr/ |
| H A D | avr.c | 2605 avr_asm_len (const char* tpl, rtx* operands, int* plen, int n_words) in avr_asm_len() argument 2607 if (plen == NULL) in avr_asm_len() 2612 *plen = -n_words; in avr_asm_len() 2614 *plen += n_words; in avr_asm_len() 3587 avr_out_lpm_no_lpmx (rtx_insn *insn, rtx *xop, int *plen) in avr_out_lpm_no_lpmx() argument 3614 avr_asm_len ("%4lpm", xop, plen, 1); in avr_out_lpm_no_lpmx() 3617 avr_asm_len ("mov %0,%3", xop, plen, 1); in avr_out_lpm_no_lpmx() 3628 "pop %A0", xop, plen, 6); in avr_out_lpm_no_lpmx() 3634 "mov %B0,%3", xop, plen, 5); in avr_out_lpm_no_lpmx() 3637 avr_asm_len ("sbiw %2,1", xop, plen, 1); in avr_out_lpm_no_lpmx() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/evp/ |
| H A D | e_chacha20_poly1305.c | 216 size_t tail, tohash_len, buf_len, plen = actx->tls_payload_length; in chacha20_poly1305_tls_cipher() local 219 if (len != plen + POLY1305_BLOCK_SIZE) in chacha20_poly1305_tls_cipher() 227 if (plen <= 3 * CHACHA_BLK_SIZE) { in chacha20_poly1305_tls_cipher() 229 buf_len = (plen + 2 * CHACHA_BLK_SIZE - 1) & (0 - CHACHA_BLK_SIZE); in chacha20_poly1305_tls_cipher() 237 actx->len.text = plen; in chacha20_poly1305_tls_cipher() 239 if (plen) { in chacha20_poly1305_tls_cipher() 241 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 243 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 245 in += plen; in chacha20_poly1305_tls_cipher() 246 out += plen; in chacha20_poly1305_tls_cipher() [all …]
|
| H A D | e_rc4_hmac_md5.c | 76 size_t plen = key->payload_length; in rc4_hmac_md5_cipher() local 78 if (plen != NO_PAYLOAD_LENGTH && len != (plen + MD5_DIGEST_LENGTH)) in rc4_hmac_md5_cipher() 82 if (plen == NO_PAYLOAD_LENGTH) in rc4_hmac_md5_cipher() 83 plen = len; in rc4_hmac_md5_cipher() 89 if (plen > md5_off && (blocks = (plen - md5_off) / MD5_CBLOCK) && in rc4_hmac_md5_cipher() 108 MD5_Update(&key->md, in + md5_off, plen - md5_off); in rc4_hmac_md5_cipher() 110 if (plen != len) { /* "TLS" mode of operation */ in rc4_hmac_md5_cipher() 112 memcpy(out + rc4_off, in + rc4_off, plen - rc4_off); in rc4_hmac_md5_cipher() 115 MD5_Final(out + plen, &key->md); in rc4_hmac_md5_cipher() 117 MD5_Update(&key->md, out + plen, MD5_DIGEST_LENGTH); in rc4_hmac_md5_cipher() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/evp/ |
| H A D | e_chacha20_poly1305.c | 218 size_t tail, tohash_len, buf_len, plen = actx->tls_payload_length; in chacha20_poly1305_tls_cipher() local 221 if (len != plen + POLY1305_BLOCK_SIZE) in chacha20_poly1305_tls_cipher() 229 if (plen <= 3 * CHACHA_BLK_SIZE) { in chacha20_poly1305_tls_cipher() 231 buf_len = (plen + 2 * CHACHA_BLK_SIZE - 1) & (0 - CHACHA_BLK_SIZE); in chacha20_poly1305_tls_cipher() 239 actx->len.text = plen; in chacha20_poly1305_tls_cipher() 241 if (plen) { in chacha20_poly1305_tls_cipher() 243 ctr = xor128_encrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 245 ctr = xor128_decrypt_n_pad(out, in, ctr, plen); in chacha20_poly1305_tls_cipher() 247 in += plen; in chacha20_poly1305_tls_cipher() 248 out += plen; in chacha20_poly1305_tls_cipher() [all …]
|
| H A D | e_rc4_hmac_md5.c | 86 size_t plen = key->payload_length; in rc4_hmac_md5_cipher() local 88 if (plen != NO_PAYLOAD_LENGTH && len != (plen + MD5_DIGEST_LENGTH)) in rc4_hmac_md5_cipher() 92 if (plen == NO_PAYLOAD_LENGTH) in rc4_hmac_md5_cipher() 93 plen = len; in rc4_hmac_md5_cipher() 99 if (plen > md5_off && (blocks = (plen - md5_off) / MD5_CBLOCK) && in rc4_hmac_md5_cipher() 118 MD5_Update(&key->md, in + md5_off, plen - md5_off); in rc4_hmac_md5_cipher() 120 if (plen != len) { /* "TLS" mode of operation */ in rc4_hmac_md5_cipher() 122 memcpy(out + rc4_off, in + rc4_off, plen - rc4_off); in rc4_hmac_md5_cipher() 125 MD5_Final(out + plen, &key->md); in rc4_hmac_md5_cipher() 127 MD5_Update(&key->md, out + plen, MD5_DIGEST_LENGTH); in rc4_hmac_md5_cipher() [all …]
|
| /netbsd-src/external/bsd/wpa/dist/src/tls/ |
| H A D | tlsv1_record.c | 356 size_t plen; in tlsv1_record_receive() local 362 plen = in_len; in tlsv1_record_receive() 364 "data", out_data, plen); in tlsv1_record_receive() 380 if (plen < rl->iv_size) { in tlsv1_record_receive() 387 plen - rl->iv_size); in tlsv1_record_receive() 388 plen -= rl->iv_size; in tlsv1_record_receive() 392 if (plen == 0) { in tlsv1_record_receive() 398 padlen = out_data[plen - 1]; in tlsv1_record_receive() 399 if (padlen >= plen) { in tlsv1_record_receive() 403 padlen, (unsigned long) plen); in tlsv1_record_receive() [all …]
|
| /netbsd-src/lib/libc/db/btree/ |
| H A D | bt_overflow.c | 87 uint32_t sz, nb, plen; in __ovfl_get() local 113 plen = (uint32_t)temp; in __ovfl_get() 118 nb = MIN(sz, plen); in __ovfl_get() 145 uint32_t sz, nb, plen; in __ovfl_put() local 154 plen = (uint32_t)temp; in __ovfl_put() 160 for (;; p = (char *)p + plen, last = h) { in __ovfl_put() 169 nb = MIN(sz, plen); in __ovfl_put() 201 uint32_t sz, plen; in __ovfl_delete() local 223 plen = (uint32_t)temp; in __ovfl_delete() 224 for (;; sz -= plen) { in __ovfl_delete() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/asn1/ |
| H A D | bio_ndef.c | 45 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg); 46 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, 48 static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg); 49 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, 129 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg) in ndef_prefix() argument 155 *plen = *ndef_aux->boundary - *pbuf; in ndef_prefix() 160 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_prefix_free() argument 177 *plen = 0; in ndef_prefix_free() 181 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_suffix_free() argument 185 if (!ndef_prefix_free(b, pbuf, plen, parg)) in ndef_suffix_free() [all …]
|
| H A D | tasn_dec.c | 40 static int collect_data(BUF_MEM *buf, const unsigned char **p, long plen); 665 long plen; in asn1_d2i_ex_primitive() local 710 ret = asn1_check_tlen(&plen, NULL, NULL, &inf, &cst, in asn1_d2i_ex_primitive() 738 if (!asn1_find_end(&p, plen, inf)) in asn1_d2i_ex_primitive() 742 len = p - cont + plen; in asn1_d2i_ex_primitive() 743 p += plen; in asn1_d2i_ex_primitive() 761 if (!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL, 0)) { in asn1_d2i_ex_primitive() 774 len = plen; in asn1_d2i_ex_primitive() 775 p += plen; in asn1_d2i_ex_primitive() 939 long plen; in asn1_find_end() local [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/asn1/ |
| H A D | bio_ndef.c | 45 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg); 46 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, 48 static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg); 49 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, 129 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg) in ndef_prefix() argument 155 *plen = *ndef_aux->boundary - *pbuf; in ndef_prefix() 160 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_prefix_free() argument 177 *plen = 0; in ndef_prefix_free() 181 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, in ndef_suffix_free() argument 185 if (!ndef_prefix_free(b, pbuf, plen, parg)) in ndef_suffix_free() [all …]
|
| H A D | tasn_dec.c | 40 static int collect_data(BUF_MEM *buf, const unsigned char **p, long plen); 704 long plen; in asn1_d2i_ex_primitive() local 749 ret = asn1_check_tlen(&plen, NULL, NULL, &inf, &cst, in asn1_d2i_ex_primitive() 776 if (!asn1_find_end(&p, plen, inf)) in asn1_d2i_ex_primitive() 780 len = p - cont + plen; in asn1_d2i_ex_primitive() 781 p += plen; in asn1_d2i_ex_primitive() 799 if (!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL, 0)) { in asn1_d2i_ex_primitive() 812 len = plen; in asn1_d2i_ex_primitive() 813 p += plen; in asn1_d2i_ex_primitive() 976 long plen; in asn1_find_end() local [all …]
|
| /netbsd-src/external/mpl/bind/dist/tests/isc/ |
| H A D | netaddr_test.c | 70 unsigned int plen; in ISC_RUN_TEST_IMPL() local 84 assert_int_equal(isc_netaddr_masktoprefixlen(&ina_a, &plen), in ISC_RUN_TEST_IMPL() 86 assert_int_equal(plen, 0); in ISC_RUN_TEST_IMPL() 88 assert_int_equal(isc_netaddr_masktoprefixlen(&ina_b, &plen), in ISC_RUN_TEST_IMPL() 90 assert_int_equal(plen, 31); in ISC_RUN_TEST_IMPL() 92 assert_int_equal(isc_netaddr_masktoprefixlen(&ina_c, &plen), in ISC_RUN_TEST_IMPL() 94 assert_int_equal(plen, 32); in ISC_RUN_TEST_IMPL() 96 assert_int_equal(isc_netaddr_masktoprefixlen(&ina_d, &plen), in ISC_RUN_TEST_IMPL() 98 assert_int_equal(plen, 24); in ISC_RUN_TEST_IMPL()
|
| /netbsd-src/usr.sbin/ip6addrctl/ |
| H A D | ip6addrctl.c | 153 int plen, first = 1; in dump_policy() local 170 if ((plen = mask2plen(&pol->addrmask)) < 0) { in dump_policy() 178 "/%d", plen); in dump_policy() 181 printf("%s/%d", addrbuf, plen); in dump_policy() 260 int e = 0, plen; in parse_prefix() local 284 plen = atoi(plenstr + 1); in parse_prefix() 285 if (plen < 0 || plen > 128) { in parse_prefix() 286 warnx("invalid prefix length: %d", plen); in parse_prefix() 290 plen2mask(&pol->addrmask, plen); in parse_prefix() 298 plen2mask(struct sockaddr_in6 *mask, int plen) in plen2mask() argument [all …]
|
| /netbsd-src/external/gpl3/binutils/dist/gold/ |
| H A D | int_encoding.h | 46 read_unsigned_LEB_128_x(const unsigned char* buffer, size_t* plen, 50 read_unsigned_LEB_128(const unsigned char* buffer, size_t* plen) in read_unsigned_LEB_128() argument 55 return read_unsigned_LEB_128_x(buffer, plen, byte); in read_unsigned_LEB_128() 57 *plen = 1; in read_unsigned_LEB_128() 67 read_signed_LEB_128_x(const unsigned char* buffer, size_t* plen, 71 read_signed_LEB_128(const unsigned char* buffer, size_t* plen) in read_signed_LEB_128() argument 76 return read_signed_LEB_128_x(buffer, plen, byte); in read_signed_LEB_128() 78 *plen = 1; in read_signed_LEB_128()
|
| /netbsd-src/external/gpl3/binutils.old/dist/gold/ |
| H A D | int_encoding.h | 46 read_unsigned_LEB_128_x(const unsigned char* buffer, size_t* plen, 50 read_unsigned_LEB_128(const unsigned char* buffer, size_t* plen) in read_unsigned_LEB_128() argument 55 return read_unsigned_LEB_128_x(buffer, plen, byte); in read_unsigned_LEB_128() 57 *plen = 1; in read_unsigned_LEB_128() 67 read_signed_LEB_128_x(const unsigned char* buffer, size_t* plen, 71 read_signed_LEB_128(const unsigned char* buffer, size_t* plen) in read_signed_LEB_128() argument 76 return read_signed_LEB_128_x(buffer, plen, byte); in read_signed_LEB_128() 78 *plen = 1; in read_signed_LEB_128()
|
| /netbsd-src/external/gpl2/gettext/dist/gettext-tools/gnulib-lib/ |
| H A D | tmpdir.c | 104 size_t dlen, plen; in path_search() local 109 plen = 4; in path_search() 113 plen = strlen (pfx); in path_search() 114 if (plen > 5) in path_search() 115 plen = 5; in path_search() 146 if (tmpl_len < dlen + 1 + plen + 6 + 1) in path_search() 152 sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx); in path_search()
|
| /netbsd-src/sys/dev/acpi/ |
| H A D | acpi_dev.c | 64 * are placed in 'paddr' and 'plen' when found. 69 ACPI_PHYSICAL_ADDRESS *paddr, uint32_t *plen) in acpi_find_table_rsdp() argument 79 *plen = sizeof(ACPI_TABLE_RSDP); in acpi_find_table_rsdp() 91 * and length are placed in 'paddr' and 'plen' when found. 96 ACPI_PHYSICAL_ADDRESS *paddr, uint32_t *plen) in acpi_find_table_sdt() argument 134 *plen = table_len; in acpi_find_table_sdt() 146 * address into 'paddr' and the length into 'plen'. 151 ACPI_PHYSICAL_ADDRESS *paddr, uint32_t *plen) in acpi_find_table() argument 160 if (acpi_find_table_rsdp(pa, paddr, plen)) { in acpi_find_table() 165 if (acpi_find_table_sdt(pa, paddr, plen)) { in acpi_find_table() [all...] |
| /netbsd-src/external/bsd/nvi/dist/common/ |
| H A D | search.c | 46 search_init(SCR *sp, dir_t dir, CHAR_T *ptrn, size_t plen, CHAR_T **epp, u_int flags) in search_init() argument 74 if (plen == 1) { in search_init() 108 if (--plen == 0 || p[0] == delim) { in search_init() 109 if (plen != 0) in search_init() 113 if (plen > 1 && p[0] == '\\') { in search_init() 116 --plen; in search_init() 119 --plen; in search_init() 126 plen = t - ptrn; in search_init() 130 if (re_compile(sp, ptrn, plen, &sp->re, &sp->re_len, &sp->re_c, in search_init() 150 f_search(SCR *sp, MARK *fm, MARK *rm, CHAR_T *ptrn, size_t plen, CHAR_T **eptrn, u_int flags) in f_search() argument [all …]
|
| /netbsd-src/lib/libpuffs/ |
| H A D | paths.c | 224 size_t plen, complen; in puffs_stdpath_buildpath() local 261 plen = slash - (char *)po_pre->po_path; in puffs_stdpath_buildpath() 267 if (plen == 0) in puffs_stdpath_buildpath() 268 plen++; in puffs_stdpath_buildpath() 270 path = malloc(plen + 1); in puffs_stdpath_buildpath() 274 strlcpy(path, po_pre->po_path, plen+1); in puffs_stdpath_buildpath() 277 plen = prelen + 1 + complen; in puffs_stdpath_buildpath() 278 path = malloc(plen + 1); in puffs_stdpath_buildpath() 288 newpath->po_len = plen; in puffs_stdpath_buildpath()
|
| /netbsd-src/external/bsd/unbound/dist/ipset/ |
| H A D | ipset.c | 145 int dlen, plen; in ipset_check_zones_for_rrset() local 159 plen = strlen(p->str); in ipset_check_zones_for_rrset() 161 if (dlen == plen || (dlen > plen && dname[dlen - plen - 1] == '.' )) { in ipset_check_zones_for_rrset() 162 ds = dname + (dlen - plen); in ipset_check_zones_for_rrset() 164 if (qlen == plen || (qlen > plen && qname[qlen - plen - 1] == '.' )) { in ipset_check_zones_for_rrset() 165 qs = qname + (qlen - plen); in ipset_check_zones_for_rrset() 167 if ((ds && strncasecmp(p->str, ds, plen) == 0) in ipset_check_zones_for_rrset() 168 || (qs && strncasecmp(p->str, qs, plen) == 0)) { in ipset_check_zones_for_rrset()
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/ec/ |
| H A D | ecx_backend.c | 159 const unsigned char *p, int plen, in ossl_ecx_key_op() argument 184 if (p == NULL || id == EVP_PKEY_NONE || plen != KEYLENID(id)) { in ossl_ecx_key_op() 198 memcpy(pubkey, p, plen); in ossl_ecx_key_op() 238 int plen; in ossl_ecx_key_from_pkcs8() local 242 if (!PKCS8_pkey_get0(NULL, &p, &plen, &palg, p8inf)) in ossl_ecx_key_from_pkcs8() 245 oct = d2i_ASN1_OCTET_STRING(NULL, &p, plen); in ossl_ecx_key_from_pkcs8() 248 plen = 0; in ossl_ecx_key_from_pkcs8() 251 plen = ASN1_STRING_length(oct); in ossl_ecx_key_from_pkcs8() 258 ecx = ossl_ecx_key_op(palg, p, plen, EVP_PKEY_NONE, KEY_OP_PRIVATE, in ossl_ecx_key_from_pkcs8()
|