| /netbsd-src/crypto/external/bsd/openssl/dist/test/ |
| H A D | rand_test.c | 22 unsigned char outbuf[3]; in test_rand() local 30 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 31 || !TEST_mem_eq(outbuf, sizeof(outbuf), entropy1, sizeof(outbuf)) in test_rand() 32 || !TEST_int_le(RAND_priv_bytes(outbuf, sizeof(outbuf) + 1), 0) in test_rand() 33 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 34 || !TEST_mem_eq(outbuf, sizeof(outbuf), in test_rand() 35 entropy1 + sizeof(outbuf), sizeof(outbuf))) in test_rand() 41 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 42 || !TEST_mem_eq(outbuf, sizeof(outbuf), entropy2, sizeof(outbuf))) in test_rand()
|
| /netbsd-src/crypto/external/bsd/libsaslc/dist/src/ |
| H A D | mech_gssapi.c | 210 prep_output(saslc_sess_t *sess, gss_buffer_t outbuf, void **out, size_t *outlen) in prep_output() argument 214 if (outbuf == GSS_C_NO_BUFFER || outbuf->value == NULL) { in prep_output() 219 if (outbuf->length == 0) { in prep_output() 222 gss_release_buffer(&min_s, outbuf); in prep_output() 225 *out = malloc(outbuf->length); in prep_output() 228 gss_release_buffer(&min_s, outbuf); in prep_output() 232 *outlen = outbuf->length; in prep_output() 233 memcpy(*out, outbuf->value, outbuf->length); in prep_output() 234 gss_release_buffer(&min_s, outbuf); in prep_output() 249 prep_packet(saslc_sess_t *sess, gss_buffer_t outbuf, void **out, size_t *outlen) in prep_packet() argument [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/demos/evp/ |
| H A D | aesgcm.c | 54 unsigned char outbuf[1024]; in aes_gcm_encrypt() local 68 EVP_EncryptUpdate(ctx, outbuf, &outlen, gcm_pt, sizeof(gcm_pt)); in aes_gcm_encrypt() 71 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_encrypt() 73 EVP_EncryptFinal_ex(ctx, outbuf, &outlen); in aes_gcm_encrypt() 75 EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, 16, outbuf); in aes_gcm_encrypt() 78 BIO_dump_fp(stdout, outbuf, 16); in aes_gcm_encrypt() 86 unsigned char outbuf[1024]; in aes_gcm_decrypt() local 100 EVP_DecryptUpdate(ctx, outbuf, &outlen, gcm_ct, sizeof(gcm_ct)); in aes_gcm_decrypt() 103 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_decrypt() 108 rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen); in aes_gcm_decrypt()
|
| H A D | aesccm.c | 54 unsigned char outbuf[1024]; in aes_ccm_encrypt() local 73 EVP_EncryptUpdate(ctx, outbuf, &outlen, ccm_pt, sizeof(ccm_pt)); in aes_ccm_encrypt() 76 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_encrypt() 78 EVP_EncryptFinal_ex(ctx, outbuf, &outlen); in aes_ccm_encrypt() 80 EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, 16, outbuf); in aes_ccm_encrypt() 83 BIO_dump_fp(stdout, outbuf, 16); in aes_ccm_encrypt() 91 unsigned char outbuf[1024]; in aes_ccm_decrypt() local 111 rv = EVP_DecryptUpdate(ctx, outbuf, &outlen, ccm_ct, sizeof(ccm_ct)); in aes_ccm_decrypt() 115 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_decrypt()
|
| /netbsd-src/external/gpl3/gcc/dist/gcc/ |
| H A D | lto-compress.cc | 136 char *outbuf = (char *) xmalloc (outbuf_length); in lto_compression_zstd() local 138 size_t const csize = ZSTD_compress (outbuf, outbuf_length, cursor, size, in lto_compression_zstd() 145 stream->callback (outbuf, csize, NULL); in lto_compression_zstd() 148 free (outbuf); in lto_compression_zstd() 167 char *outbuf = (char *) xmalloc (rsize); in lto_uncompression_zstd() local 168 size_t const dsize = ZSTD_decompress (outbuf, rsize, cursor, size); in lto_uncompression_zstd() 174 stream->callback (outbuf, dsize, stream->opaque); in lto_uncompression_zstd() 177 free (outbuf); in lto_uncompression_zstd() 251 unsigned char *outbuf = (unsigned char *) xmalloc (outbuf_length); in lto_compression_zlib() local 259 out_stream.next_out = outbuf; in lto_compression_zlib() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/demos/cipher/ |
| H A D | ariacbc.c | 62 unsigned char outbuf[1024]; in aria_cbc_encrypt() local 85 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, cbc_pt, sizeof(cbc_pt))) in aria_cbc_encrypt() 89 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_encrypt() 95 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_encrypt() 97 if (sizeof(cbc_ct) == outlen && !CRYPTO_memcmp(outbuf, cbc_ct, outlen)) in aria_cbc_encrypt() 120 unsigned char outbuf[1024]; in aria_cbc_decrypt() local 141 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, cbc_ct, sizeof(cbc_ct))) in aria_cbc_decrypt() 145 if (!EVP_DecryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_decrypt() 151 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_decrypt() 153 if (sizeof(cbc_pt) == outlen && !CRYPTO_memcmp(outbuf, cbc_pt, outlen)) in aria_cbc_decrypt()
|
| H A D | aeskeywrap.c | 62 unsigned char outbuf[1024]; in aes_wrap_encrypt() local 86 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, wrap_pt, sizeof(wrap_pt))) in aes_wrap_encrypt() 90 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_encrypt() 96 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_encrypt() 98 if (sizeof(wrap_ct) == outlen && !CRYPTO_memcmp(outbuf, wrap_ct, outlen)) in aes_wrap_encrypt() 120 unsigned char outbuf[1024]; in aes_wrap_decrypt() local 143 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, wrap_ct, sizeof(wrap_ct))) in aes_wrap_decrypt() 147 if (!EVP_DecryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_decrypt() 153 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_decrypt() 155 if (sizeof(wrap_pt) == outlen && !CRYPTO_memcmp(outbuf, wrap_pt, outlen)) in aes_wrap_decrypt()
|
| H A D | aesgcm.c | 77 unsigned char outbuf[1024]; in aes_gcm_encrypt() local 114 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, gcm_pt, sizeof(gcm_pt))) in aes_gcm_encrypt() 119 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_encrypt() 122 if (!EVP_EncryptFinal_ex(ctx, outbuf, &tmplen)) in aes_gcm_encrypt() 154 unsigned char outbuf[1024]; in aes_gcm_decrypt() local 186 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, gcm_ct, sizeof(gcm_ct))) in aes_gcm_decrypt() 191 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_decrypt() 201 rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen); in aes_gcm_decrypt()
|
| /netbsd-src/external/gpl3/gcc.old/dist/gcc/ |
| H A D | lto-compress.c | 136 char *outbuf = (char *) xmalloc (outbuf_length); in lto_compression_zstd() local 138 size_t const csize = ZSTD_compress (outbuf, outbuf_length, cursor, size, in lto_compression_zstd() 145 stream->callback (outbuf, csize, NULL); in lto_compression_zstd() 148 free (outbuf); in lto_compression_zstd() 167 char *outbuf = (char *) xmalloc (rsize); in lto_uncompression_zstd() local 168 size_t const dsize = ZSTD_decompress (outbuf, rsize, cursor, size); in lto_uncompression_zstd() 174 stream->callback (outbuf, dsize, stream->opaque); in lto_uncompression_zstd() 177 free (outbuf); in lto_uncompression_zstd() 251 unsigned char *outbuf = (unsigned char *) xmalloc (outbuf_length); in lto_compression_zlib() local 260 out_stream.next_out = outbuf; in lto_compression_zlib() [all …]
|
| /netbsd-src/external/bsd/openldap/dist/libraries/liblutil/ |
| H A D | getopt.c | 63 char *ptr, outbuf[4096]; in ERR() local 65 ptr = lutil_strncopy(outbuf, argv[0], sizeof(outbuf) - 2); in ERR() 66 ptr = lutil_strncopy(ptr, s, sizeof(outbuf)-2 -(ptr-outbuf)); in ERR() 70 __atoe_l(outbuf, ptr - outbuf); in ERR() 72 (void) write(STDERR_FILENO,outbuf,ptr - outbuf); in ERR()
|
| /netbsd-src/usr.bin/fmt/ |
| H A D | fmt.c | 76 static struct buffer outbuf; variable 110 buf_init(&outbuf); in main() 172 buf_end(&outbuf); in main() 453 if (outbuf.bptr == outbuf.ptr) in pack() 460 s = outbuf.ptr - outbuf.bptr; in pack() 468 buf_putc(&outbuf, *cp++); in pack() 476 buf_putc(&outbuf, *cp++); in pack() 486 if (outbuf.bptr == outbuf.ptr) in oflush() 488 buf_putc(&outbuf, '\0'); in oflush() 489 (void)buf_unputc(&outbuf); in oflush() [all …]
|
| /netbsd-src/external/gpl2/xcvs/dist/src/ |
| H A D | gssapi-client.c | 217 gss_buffer_desc inbuf, outbuf; in cvs_gssapi_wrap_input() local 224 if (gss_unwrap (&stat_min, gd->gcontext, &inbuf, &outbuf, &conf, NULL) in cvs_gssapi_wrap_input() 230 if (outbuf.length > size) in cvs_gssapi_wrap_input() 233 memcpy (output, outbuf.value, outbuf.length); in cvs_gssapi_wrap_input() 238 gss_release_buffer (&stat_min, &outbuf); in cvs_gssapi_wrap_input() 251 gss_buffer_desc inbuf, outbuf; in cvs_gssapi_wrap_output() local 265 &inbuf, &conf, &outbuf) != GSS_S_COMPLETE) in cvs_gssapi_wrap_output() 272 if (outbuf.length > size + 100) in cvs_gssapi_wrap_output() 275 memcpy (output, outbuf.value, outbuf.length); in cvs_gssapi_wrap_output() 277 *translated = outbuf.length; in cvs_gssapi_wrap_output() [all …]
|
| /netbsd-src/sys/fs/cd9660/ |
| H A D | cd9660_rrip.c | 120 char *outbuf; in cd9660_rrip_slink() local 127 outbuf = ana->outbuf; in cd9660_rrip_slink() 141 *outbuf++ = '/'; in cd9660_rrip_slink() 164 outbuf -= len; in cd9660_rrip_slink() 171 outbuf -= len; in cd9660_rrip_slink() 201 ana->outbuf -= *ana->outlen; in cd9660_rrip_slink() 206 memcpy(outbuf, inbuf, wlen); in cd9660_rrip_slink() 207 outbuf += wlen; in cd9660_rrip_slink() 210 ana->outbuf = outbuf; in cd9660_rrip_slink() 271 ana->outbuf -= *ana->outlen - wlen; in cd9660_rrip_altname() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/lib/libdes/ |
| H A D | oenc_writ.c | 88 static unsigned char *outbuf=NULL; in des_enc_write() local 94 if (outbuf == NULL) in des_enc_write() 96 outbuf=OPENSSL_malloc(BSIZE+HDRSIZE); in des_enc_write() 97 if (outbuf == NULL) return(-1); in des_enc_write() 123 p=outbuf; in des_enc_write() 142 des_pcbc_encrypt(cp,&(outbuf[HDRSIZE]),(len<8)?8:len,sched,iv, in des_enc_write() 145 des_cbc_encrypt(cp,&(outbuf[HDRSIZE]),(len<8)?8:len,sched,iv, in des_enc_write() 155 i=write(fd,(void *)&(outbuf[j]),outnum-j); in des_enc_write()
|
| /netbsd-src/crypto/external/bsd/openssl.old/lib/libdes/ |
| H A D | oenc_writ.c | 88 static unsigned char *outbuf=NULL; in des_enc_write() local 94 if (outbuf == NULL) in des_enc_write() 96 outbuf=OPENSSL_malloc(BSIZE+HDRSIZE); in des_enc_write() 97 if (outbuf == NULL) return(-1); in des_enc_write() 123 p=outbuf; in des_enc_write() 142 des_pcbc_encrypt(cp,&(outbuf[HDRSIZE]),(len<8)?8:len,sched,iv, in des_enc_write() 145 des_cbc_encrypt(cp,&(outbuf[HDRSIZE]),(len<8)?8:len,sched,iv, in des_enc_write() 155 i=write(fd,(void *)&(outbuf[j]),outnum-j); in des_enc_write()
|
| /netbsd-src/sys/crypto/aes/ |
| H A D | aes_selftest.c | 108 uint8_t outbuf[18] = { [0] = 0x1a, [17] = 0x1a }, *out = outbuf + 1; in aes_selftest_encdec() local 129 if (outbuf[0] != 0x1a) in aes_selftest_encdec() 130 return aes_selftest_fail(impl, outbuf, in aes_selftest_encdec() 133 if (outbuf[17] != 0x1a) in aes_selftest_encdec() 134 return aes_selftest_fail(impl, outbuf + 17, in aes_selftest_encdec() 211 uint8_t outbuf[146] = { [0] = 0x1a, [145] = 0x1a }, *out = outbuf + 1; in aes_selftest_encdec_cbc() local 262 if (outbuf[0] != 0x1a) in aes_selftest_encdec_cbc() 263 return aes_selftest_fail(impl, outbuf, in aes_selftest_encdec_cbc() 266 if (outbuf[145] != 0x1a) in aes_selftest_encdec_cbc() 267 return aes_selftest_fail(impl, outbuf + 145, in aes_selftest_encdec_cbc() [all …]
|
| /netbsd-src/crypto/external/bsd/heimdal/dist/lib/krb5/ |
| H A D | rd_safe.c | 89 krb5_data *outbuf, in krb5_rd_safe() argument 96 krb5_data_zero(outbuf); in krb5_rd_safe() 193 outbuf->length = safe.safe_body.user_data.length; in krb5_rd_safe() 194 outbuf->data = malloc(outbuf->length); in krb5_rd_safe() 195 if (outbuf->data == NULL && outbuf->length != 0) { in krb5_rd_safe() 197 krb5_data_zero(outbuf); in krb5_rd_safe() 200 memcpy (outbuf->data, safe.safe_body.user_data.data, outbuf->length); in krb5_rd_safe()
|
| /netbsd-src/external/public-domain/xz/dist/doc/examples/ |
| H A D | 03_compress_custom.c | 110 uint8_t outbuf[BUFSIZ]; in compress() local 114 strm->next_out = outbuf; in compress() 115 strm->avail_out = sizeof(outbuf); in compress() 136 size_t write_size = sizeof(outbuf) - strm->avail_out; in compress() 138 if (fwrite(outbuf, 1, write_size, outfile) in compress() 145 strm->next_out = outbuf; in compress() 146 strm->avail_out = sizeof(outbuf); in compress()
|
| H A D | 01_compress_easy.c | 117 uint8_t outbuf[BUFSIZ]; in compress() local 132 strm->next_out = outbuf; in compress() 133 strm->avail_out = sizeof(outbuf); in compress() 183 size_t write_size = sizeof(outbuf) - strm->avail_out; in compress() 185 if (fwrite(outbuf, 1, write_size, outfile) in compress() 193 strm->next_out = outbuf; in compress() 194 strm->avail_out = sizeof(outbuf); in compress()
|
| H A D | 04_compress_easy_mt.c | 123 uint8_t outbuf[BUFSIZ]; in compress() local 127 strm->next_out = outbuf; in compress() 128 strm->avail_out = sizeof(outbuf); in compress() 149 size_t write_size = sizeof(outbuf) - strm->avail_out; in compress() 151 if (fwrite(outbuf, 1, write_size, outfile) in compress() 158 strm->next_out = outbuf; in compress() 159 strm->avail_out = sizeof(outbuf); in compress()
|
| H A D | 02_decompress.c | 119 uint8_t outbuf[BUFSIZ]; in decompress() local 123 strm->next_out = outbuf; in decompress() 124 strm->avail_out = sizeof(outbuf); in decompress() 150 size_t write_size = sizeof(outbuf) - strm->avail_out; in decompress() 152 if (fwrite(outbuf, 1, write_size, outfile) in decompress() 159 strm->next_out = outbuf; in decompress() 160 strm->avail_out = sizeof(outbuf); in decompress()
|
| /netbsd-src/sys/arch/alpha/stand/mkbootimage/ |
| H A D | mkbootimage.c | 61 char *outbuf; in main() local 117 outbuf = malloc(outbufsize); in main() 118 if (outbuf == NULL) in main() 120 memset(outbuf, 0, outbufsize); in main() 123 rv = read(infd, outbuf + sizeof (struct alpha_boot_block), in main() 132 bb = (struct alpha_boot_block *)outbuf; in main() 158 rv = write(outfd, outbuf, outbufsize); in main()
|
| /netbsd-src/external/bsd/ipf/dist/samples/ |
| H A D | proxy.c | 233 char netbuf[1024], outbuf[1024]; local 249 orptr = outbuf; 250 owptr = outbuf; 251 osz = sizeof(outbuf); 259 if (orptr - outbuf < sizeof(outbuf)) 264 if (osz < sizeof(outbuf)) 279 i = read(net, orptr, sizeof(outbuf) - (orptr - outbuf)); 292 if (osz == sizeof(outbuf) || owptr == orptr) { 293 orptr = outbuf; 294 owptr = outbuf;
|
| /netbsd-src/usr.bin/gzip/ |
| H A D | unbzip2.c | 40 static char *inbuf, *outbuf; in unbzip2() local 44 if (outbuf == NULL) in unbzip2() 45 outbuf = malloc(BUFLEN); in unbzip2() 46 if (inbuf == NULL || outbuf == NULL) in unbzip2() 82 bzs.next_out = outbuf; in unbzip2() 104 n = write(out, outbuf, BUFLEN - bzs.avail_out); in unbzip2()
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/ct/ |
| H A D | ct_b64.c | 28 unsigned char *outbuf = NULL; in ct_base64_decode() local 36 outbuf = OPENSSL_malloc(outlen); in ct_base64_decode() 37 if (outbuf == NULL) { in ct_base64_decode() 42 outlen = EVP_DecodeBlock(outbuf, (unsigned char *)in, inlen); in ct_base64_decode() 56 *out = outbuf; in ct_base64_decode() 59 OPENSSL_free(outbuf); in ct_base64_decode()
|