/freebsd/sys/contrib/libb2/ |
H A D | blake2-dispatch.c | 158 int blake2b_init_ref( blake2b_state *S, size_t outlen ); 159 int blake2b_init_key_ref( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); 162 int blake2b_final_ref( blake2b_state *S, uint8_t *out, size_t outlen ); 163 …int blake2b_ref( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_… 167 int blake2b_init_sse2( blake2b_state *S, size_t outlen ); 168 int blake2b_init_key_sse2( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); 171 int blake2b_final_sse2( blake2b_state *S, uint8_t *out, size_t outlen ); 172 …int blake2b_sse2( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size… 174 int blake2b_init_ssse3( blake2b_state *S, size_t outlen ); 175 int blake2b_init_key_ssse3( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); [all …]
|
H A D | blake2bp.c | 28 static int blake2bp_init_leaf( blake2b_state *S, uint8_t outlen, uint8_t keylen, uint64_t offset ) in blake2bp_init_leaf() argument 31 P->digest_length = outlen; in blake2bp_init_leaf() 43 S->outlen = P->inner_length; in blake2bp_init_leaf() 47 static int blake2bp_init_root( blake2b_state *S, uint8_t outlen, uint8_t keylen ) in blake2bp_init_root() argument 50 P->digest_length = outlen; in blake2bp_init_root() 62 S->outlen = P->digest_length; in blake2bp_init_root() 67 int blake2bp_init( blake2bp_state *S, size_t outlen ) in blake2bp_init() argument 69 if( !outlen || outlen > BLAKE2B_OUTBYTES ) return -1; in blake2bp_init() 74 if( blake2bp_init_root( S->R, ( uint8_t ) outlen, 0 ) < 0 ) in blake2bp_init() 78 if( blake2bp_init_leaf( S->S[i], ( uint8_t ) outlen, 0, i ) < 0 ) return -1; in blake2bp_init() [all …]
|
H A D | blake2sp.c | 27 static int blake2sp_init_leaf( blake2s_state *S, uint8_t outlen, uint8_t keylen, uint64_t offset ) in blake2sp_init_leaf() argument 30 P->digest_length = outlen; in blake2sp_init_leaf() 41 S->outlen = P->inner_length; in blake2sp_init_leaf() 45 static int blake2sp_init_root( blake2s_state *S, uint8_t outlen, uint8_t keylen ) in blake2sp_init_root() argument 48 P->digest_length = outlen; in blake2sp_init_root() 59 S->outlen = P->digest_length; in blake2sp_init_root() 64 int blake2sp_init( blake2sp_state *S, size_t outlen ) in blake2sp_init() argument 66 if( !outlen || outlen > BLAKE2S_OUTBYTES ) return -1; in blake2sp_init() 71 if( blake2sp_init_root( S->R, ( uint8_t ) outlen, 0 ) < 0 ) in blake2sp_init() 75 if( blake2sp_init_leaf( S->S[i], ( uint8_t ) outlen, 0, i ) < 0 ) return -1; in blake2sp_init() [all …]
|
H A D | blake2.h | 93 uint8_t outlen; member 119 uint8_t outlen; member 129 uint8_t outlen; member 138 uint8_t outlen; member 143 BLAKE2_API int blake2s_init( blake2s_state *S, size_t outlen ); 144 …BLAKE2_API int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); 147 BLAKE2_API int blake2s_final( blake2s_state *S, uint8_t *out, size_t outlen ); 149 BLAKE2_API int blake2b_init( blake2b_state *S, size_t outlen ); 150 …BLAKE2_API int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); 153 BLAKE2_API int blake2b_final( blake2b_state *S, uint8_t *out, size_t outlen ); [all …]
|
H A D | blake2b-ref.c | 158 int blake2b_init( blake2b_state *S, size_t outlen ); 160 int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); 162 int blake2b_final( blake2b_state *S, uint8_t *out, size_t outlen ); 163 …int blake2b( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t ke… 178 S->outlen = P->digest_length; in blake2b_init_param() 184 int blake2b_init( blake2b_state *S, size_t outlen ) in blake2b_init() argument 188 if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; in blake2b_init() 190 P->digest_length = ( uint8_t ) outlen; in blake2b_init() 205 int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ) in blake2b_init_key() argument 209 if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; in blake2b_init_key() [all …]
|
H A D | blake2s-ref.c | 151 int blake2s_init( blake2s_state *S, size_t outlen ); 153 int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); 155 int blake2s_final( blake2s_state *S, uint8_t *out, size_t outlen ); 156 …int blake2s( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t ke… 171 S->outlen = P->digest_length; in blake2s_init_param() 177 int blake2s_init( blake2s_state *S, size_t outlen ) in blake2s_init() argument 182 if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; in blake2s_init() 184 P->digest_length = ( uint8_t) outlen; in blake2s_init() 198 int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ) in blake2s_init_key() argument 202 if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; in blake2s_init_key() [all …]
|
H A D | blake2s.c | 188 int blake2s_init( blake2s_state *S, size_t outlen ); 190 int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); 192 int blake2s_final( blake2s_state *S, uint8_t *out, size_t outlen ); 193 …int blake2s( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t ke… 212 S->outlen = P->digest_length; in blake2s_init_param() 218 int blake2s_init( blake2s_state *S, size_t outlen ) in blake2s_init() argument 220 if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; in blake2s_init() 224 outlen, in blake2s_init() 239 int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ) in blake2s_init_key() argument 241 if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; in blake2s_init_key() [all …]
|
H A D | blake2b.c | 202 int blake2b_init( blake2b_state *S, size_t outlen ); 204 int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); 206 int blake2b_final( blake2b_state *S, uint8_t *out, size_t outlen ); 207 …int blake2b( uint8_t *out, const void *in, const void *key, size_t outlen, size_t inlen, size_t ke… 225 S->outlen = P->digest_length; in blake2b_init_param() 232 int blake2b_init( blake2b_state *S, size_t outlen ) in blake2b_init() argument 234 if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; in blake2b_init() 238 ( uint8_t ) outlen, in blake2b_init() 253 int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ) in blake2b_init_key() argument 255 if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1; in blake2b_init_key() [all …]
|
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_generichash/blake2b/ref/ |
H A D | generichash_blake2b.c | 11 crypto_generichash_blake2b(unsigned char *out, size_t outlen, in crypto_generichash_blake2b() argument 15 if (outlen <= 0U || outlen > BLAKE2B_OUTBYTES || in crypto_generichash_blake2b() 19 assert(outlen <= UINT8_MAX); in crypto_generichash_blake2b() 22 return blake2b((uint8_t *) out, in, key, (uint8_t) outlen, (uint64_t) inlen, in crypto_generichash_blake2b() 28 unsigned char *out, size_t outlen, const unsigned char *in, in crypto_generichash_blake2b_salt_personal() argument 32 if (outlen <= 0U || outlen > BLAKE2B_OUTBYTES || in crypto_generichash_blake2b_salt_personal() 36 assert(outlen <= UINT8_MAX); in crypto_generichash_blake2b_salt_personal() 39 return blake2b_salt_personal((uint8_t *) out, in, key, (uint8_t) outlen, in crypto_generichash_blake2b_salt_personal() 47 const size_t outlen) in crypto_generichash_blake2b_init() argument 49 if (outlen <= 0U || outlen > BLAKE2B_OUTBYTES || in crypto_generichash_blake2b_init() [all …]
|
H A D | blake2b-ref.c | 124 blake2b_init(blake2b_state *S, const uint8_t outlen) in blake2b_init() argument 128 if ((!outlen) || (outlen > BLAKE2B_OUTBYTES)) { in blake2b_init() 131 P->digest_length = outlen; in blake2b_init() 146 blake2b_init_salt_personal(blake2b_state *S, const uint8_t outlen, in blake2b_init_salt_personal() argument 151 if ((!outlen) || (outlen > BLAKE2B_OUTBYTES)) { in blake2b_init_salt_personal() 154 P->digest_length = outlen; in blake2b_init_salt_personal() 177 blake2b_init_key(blake2b_state *S, const uint8_t outlen, const void *key, in blake2b_init_key() argument 182 if ((!outlen) || (outlen > BLAKE2B_OUTBYTES)) { in blake2b_init_key() 188 P->digest_length = outlen; in blake2b_init_key() 214 blake2b_init_key_salt_personal(blake2b_state *S, const uint8_t outlen, in blake2b_init_key_salt_personal() argument [all …]
|
/freebsd/sys/contrib/openzfs/module/zcommon/ |
H A D | zfs_valstr.c | 53 uint64_t bits, char *out, size_t outlen) in valstr_bitfield_bits() argument 58 if (n == outlen) in valstr_bitfield_bits() 63 if (n < outlen) in valstr_bitfield_bits() 75 uint64_t bits, char *out, size_t outlen) in valstr_bitfield_pairs() argument 80 ASSERT3U(n, <=, outlen); in valstr_bitfield_pairs() 81 if (n == outlen) in valstr_bitfield_pairs() 86 if (n > outlen-len) in valstr_bitfield_pairs() 94 if (n < outlen) in valstr_bitfield_pairs() 106 uint64_t bits, char *out, size_t outlen) in valstr_bitfield_str() argument 111 ASSERT3U(n, <=, outlen); in valstr_bitfield_str() [all …]
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_blake2.h | 59 size_t outlen; member 70 size_t outlen; member 80 size_t outlen; member 89 size_t outlen; member 147 int blake2s_init( blake2s_state *S, size_t outlen ); 148 int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ); 151 int blake2s_final( blake2s_state *S, void *out, size_t outlen ); 153 int blake2b_init( blake2b_state *S, size_t outlen ); 154 int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen ); 157 int blake2b_final( blake2b_state *S, void *out, size_t outlen ); [all …]
|
H A D | archive_blake2sp_ref.c | 41 S->outlen = P->inner_length; in blake2sp_init_leaf_param() 45 static int blake2sp_init_leaf( blake2s_state *S, size_t outlen, size_t keylen, uint32_t offset ) in blake2sp_init_leaf() argument 48 P->digest_length = (uint8_t)outlen; in blake2sp_init_leaf() 62 static int blake2sp_init_root( blake2s_state *S, size_t outlen, size_t keylen ) in blake2sp_init_root() argument 65 P->digest_length = (uint8_t)outlen; in blake2sp_init_root() 80 int blake2sp_init( blake2sp_state *S, size_t outlen ) in blake2sp_init() argument 84 if( !outlen || outlen > BLAKE2S_OUTBYTES ) return -1; in blake2sp_init() 88 S->outlen = outlen; in blake2sp_init() 90 if( blake2sp_init_root( S->R, outlen, 0 ) < 0 ) in blake2sp_init() 94 if( blake2sp_init_leaf( S->S[i], outlen, 0, (uint32_t)i ) < 0 ) return -1; in blake2sp_init() [all …]
|
H A D | archive_blake2s_ref.c | 89 S->outlen = P->digest_length; in blake2s_init_param() 95 int blake2s_init( blake2s_state *S, size_t outlen ) in blake2s_init() argument 100 if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; in blake2s_init() 102 P->digest_length = (uint8_t)outlen; in blake2s_init() 117 int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t keylen ) in blake2s_init_key() argument 121 if ( ( !outlen ) || ( outlen > BLAKE2S_OUTBYTES ) ) return -1; in blake2s_init_key() 125 P->digest_length = (uint8_t)outlen; in blake2s_init_key() 243 int blake2s_final( blake2s_state *S, void *out, size_t outlen ) in blake2s_final() argument 248 if( out == NULL || outlen < S->outlen ) in blake2s_final() 262 memcpy( out, buffer, outlen ); in blake2s_final() [all …]
|
/freebsd/contrib/smbfs/lib/smb/ |
H A D | nls.c | 106 size_t inlen, outlen; in nls_str_toloc() local 110 inlen = outlen = strlen(src); in nls_str_toloc() 111 iconv(nls_toloc, NULL, NULL, &p, &outlen); in nls_str_toloc() 112 while (iconv(nls_toloc, &src, &inlen, &p, &outlen) == -1) { in nls_str_toloc() 115 outlen--; in nls_str_toloc() 129 size_t inlen, outlen; in nls_str_toext() local 133 inlen = outlen = strlen(src); in nls_str_toext() 134 iconv(nls_toext, NULL, NULL, &p, &outlen); in nls_str_toext() 135 while (iconv(nls_toext, &src, &inlen, &p, &outlen) == -1) { in nls_str_toext() 138 outlen--; in nls_str_toext() [all …]
|
/freebsd/crypto/openssl/demos/cipher/ |
H A D | aeskeywrap.c | 61 int outlen, tmplen; 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() 92 outlen += tmplen; in aes_wrap_encrypt() 95 printf("Ciphertext (outlen:%d):\n", outlen); 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() 119 int outlen, tmplen; 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() [all …]
|
H A D | ariacbc.c | 60 int outlen, tmplen; 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() 91 outlen += tmplen; in aria_cbc_encrypt() 94 printf("Ciphertext (outlen:%d):\n", outlen); 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() 118 int outlen, tmplen, rv; 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() [all …]
|
H A D | aesccm.c | 76 int outlen, tmplen; in aes_ccm_encrypt() local 116 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_pt))) in aes_ccm_encrypt() 120 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, ccm_adata, sizeof(ccm_adata))) in aes_ccm_encrypt() 124 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, ccm_pt, sizeof(ccm_pt))) in aes_ccm_encrypt() 129 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_encrypt() 163 int outlen, rv; in aes_ccm_decrypt() local 200 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_ct))) in aes_ccm_decrypt() 204 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, ccm_adata, sizeof(ccm_adata))) in aes_ccm_decrypt() 208 rv = EVP_DecryptUpdate(ctx, outbuf, &outlen, ccm_ct, sizeof(ccm_ct)); in aes_ccm_decrypt() 213 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_decrypt()
|
/freebsd/crypto/openssl/crypto/asn1/ |
H A D | a_strex.c | 143 int i, outlen, len, charwidth; in do_buf() local 150 outlen = 0; in do_buf() 220 outlen += len; in do_buf() 227 outlen += len; in do_buf() 230 return outlen; in do_buf() 270 int outlen, der_len; in do_dump() local 276 outlen = do_hex_dump(io_ch, arg, str->data, str->length); in do_dump() 277 if (outlen < 0) in do_dump() 279 return outlen + 1; in do_dump() 292 outlen = do_hex_dump(io_ch, arg, der_buf, der_len); in do_dump() [all …]
|
/freebsd/crypto/openssl/test/ |
H A D | punycode_test.c | 169 size_t outlen; in test_a2ulabel() local 176 if (!TEST_int_eq(ossl_a2ulabel("xn--a.b.c", NULL, &outlen), 0) in test_a2ulabel() 177 || !TEST_size_t_eq(outlen, 7) in test_a2ulabel() 178 || !TEST_int_eq(ossl_a2ulabel("xn--a.b.c", out, &outlen), 1)) in test_a2ulabel() 181 outlen = 1; in test_a2ulabel() 182 if (!TEST_int_eq(ossl_a2ulabel("xn--a.b.c", out, &outlen), 0) in test_a2ulabel() 183 || !TEST_size_t_eq(outlen, 7) in test_a2ulabel() 184 || !TEST_int_eq(ossl_a2ulabel("xn--a.b.c", out, &outlen), 1) in test_a2ulabel() 188 outlen = 6; in test_a2ulabel() 189 if (!TEST_int_eq(ossl_a2ulabel("xn--a.b.c", out, &outlen), 0) in test_a2ulabel() [all …]
|
/freebsd/contrib/openbsm/bin/auditdistd/ |
H A D | strndup.h | 39 size_t outlen; in strndup() local 42 outlen = strlen(str); in strndup() 43 if (outlen > len) in strndup() 44 outlen = len; in strndup() 45 outstr = malloc(outlen + 1); in strndup() 47 memcpy(outstr, str, outlen); in strndup() 48 outstr[outlen] = '\0'; in strndup()
|
/freebsd/contrib/unifdef/win32/ |
H A D | win32.c | 65 int outlen, cpylen, tmplen; in c99_snprintf() local 69 outlen = _vscprintf(format, ap); in c99_snprintf() 71 if (buflen == 0 || outlen < 0) in c99_snprintf() 72 return outlen; in c99_snprintf() 73 if (buflen > outlen) in c99_snprintf() 74 cpylen = outlen; in c99_snprintf() 78 tmplen = outlen + 2; in c99_snprintf() 90 return outlen; in c99_snprintf()
|
/freebsd/sys/netgraph/ |
H A D | ng_deflate.c | 421 int outlen, inlen; in ng_deflate_compress() local 447 outlen = DEFLATE_BUF_SIZE; in ng_deflate_compress() 459 priv->cx.avail_out = outlen - 2 - DEFLATE_HDRLEN; in ng_deflate_compress() 474 outlen -= priv->cx.avail_out; in ng_deflate_compress() 482 outlen -= 4; in ng_deflate_compress() 483 MPASS(outlen > 0); in ng_deflate_compress() 484 MPASS(priv->outbuf[outlen + 0] == 0x00); in ng_deflate_compress() 485 MPASS(priv->outbuf[outlen + 1] == 0x00); in ng_deflate_compress() 486 MPASS(priv->outbuf[outlen + 2] == 0xff); in ng_deflate_compress() 487 MPASS(priv->outbuf[outlen + 3] == 0xff); in ng_deflate_compress() [all …]
|
/freebsd/contrib/sendmail/libsm/ |
H A D | lowercase.c | 139 static int outlen = 0; local 161 if (olen > outlen) 163 outlen = olen; 164 out = sm_realloc_x(out, outlen); 175 outlen = req + 1; 176 out = sm_realloc_x(out, outlen); 183 outlen = req + 1; 184 out = sm_realloc_x(out, outlen); 185 olen = outlen;
|
/freebsd/crypto/openssl/providers/implementations/kem/ |
H A D | rsa_kem.c | 210 unsigned char *out, int outlen) in rsasve_gen_rand_bytes() argument 234 && (BN_bn2binpad(z, out, outlen) == outlen)); in rsasve_gen_rand_bytes() 245 unsigned char *out, size_t *outlen, in rsasve_generate() argument 259 if (outlen == NULL && secretlen == NULL) in rsasve_generate() 261 if (outlen != NULL) in rsasve_generate() 262 *outlen = nlen; in rsasve_generate() 278 if (outlen != NULL) in rsasve_generate() 279 *outlen = nlen; in rsasve_generate() 293 unsigned char *out, size_t *outlen, in rsasve_recover() argument 306 *outlen = nlen; in rsasve_recover() [all …]
|