Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 148) sorted by relevance

123456

/net-tools-3.5.0/mbedtls-2.4.0/library/
Ddes.c60 #define GET_UINT32_BE(n,b,i) \ argument
62 (n) = ( (uint32_t) (b)[(i) ] << 24 ) \
63 | ( (uint32_t) (b)[(i) + 1] << 16 ) \
64 | ( (uint32_t) (b)[(i) + 2] << 8 ) \
65 | ( (uint32_t) (b)[(i) + 3] ); \
70 #define PUT_UINT32_BE(n,b,i) \ argument
72 (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
73 (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
74 (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
75 (b)[(i) + 3] = (unsigned char) ( (n) ); \
[all …]
Dgcm.c61 #define GET_UINT32_BE(n,b,i) \ argument
63 (n) = ( (uint32_t) (b)[(i) ] << 24 ) \
64 | ( (uint32_t) (b)[(i) + 1] << 16 ) \
65 | ( (uint32_t) (b)[(i) + 2] << 8 ) \
66 | ( (uint32_t) (b)[(i) + 3] ); \
71 #define PUT_UINT32_BE(n,b,i) \ argument
73 (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
74 (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
75 (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
76 (b)[(i) + 3] = (unsigned char) ( (n) ); \
[all …]
Dxtea.c54 #define GET_UINT32_BE(n,b,i) \ argument
56 (n) = ( (uint32_t) (b)[(i) ] << 24 ) \
57 | ( (uint32_t) (b)[(i) + 1] << 16 ) \
58 | ( (uint32_t) (b)[(i) + 2] << 8 ) \
59 | ( (uint32_t) (b)[(i) + 3] ); \
64 #define PUT_UINT32_BE(n,b,i) \ argument
66 (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
67 (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
68 (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
69 (b)[(i) + 3] = (unsigned char) ( (n) ); \
[all …]
Dcamellia.c60 #define GET_UINT32_BE(n,b,i) \ argument
62 (n) = ( (uint32_t) (b)[(i) ] << 24 ) \
63 | ( (uint32_t) (b)[(i) + 1] << 16 ) \
64 | ( (uint32_t) (b)[(i) + 2] << 8 ) \
65 | ( (uint32_t) (b)[(i) + 3] ); \
70 #define PUT_UINT32_BE(n,b,i) \ argument
72 (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
73 (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
74 (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
75 (b)[(i) + 3] = (unsigned char) ( (n) ); \
[all …]
Dsha256.c62 #define GET_UINT32_BE(n,b,i) \ argument
64 (n) = ( (uint32_t) (b)[(i) ] << 24 ) \
65 | ( (uint32_t) (b)[(i) + 1] << 16 ) \
66 | ( (uint32_t) (b)[(i) + 2] << 8 ) \
67 | ( (uint32_t) (b)[(i) + 3] ); \
72 #define PUT_UINT32_BE(n,b,i) \ argument
74 (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
75 (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
76 (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
77 (b)[(i) + 3] = (unsigned char) ( (n) ); \
[all …]
Dblowfish.c51 #define GET_UINT32_BE(n,b,i) \ argument
53 (n) = ( (uint32_t) (b)[(i) ] << 24 ) \
54 | ( (uint32_t) (b)[(i) + 1] << 16 ) \
55 | ( (uint32_t) (b)[(i) + 2] << 8 ) \
56 | ( (uint32_t) (b)[(i) + 3] ); \
61 #define PUT_UINT32_BE(n,b,i) \ argument
63 (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
64 (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
65 (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
66 (b)[(i) + 3] = (unsigned char) ( (n) ); \
[all …]
Dccm.c116 for( i = 0; i < 16; i++ ) \
117 y[i] ^= b[i]; \
131 for( i = 0; i < len; i++ ) \
132 dst[i] = src[i] ^ b[i];
144 unsigned char i; in ccm_auth_crypt() local
189 for( i = 0, len_left = length; i < q; i++, len_left >>= 8 ) in ccm_auth_crypt()
190 b[15-i] = (unsigned char)( len_left & 0xFF ); in ccm_auth_crypt()
287 for( i = 0; i < q; i++ ) in ccm_auth_crypt()
288 if( ++ctr[15-i] != 0 ) in ccm_auth_crypt()
295 for( i = 0; i < q; i++ ) in ccm_auth_crypt()
[all …]
Dmd2.c119 int i, j; in mbedtls_md2_process() local
122 for( i = 0; i < 16; i++ ) in mbedtls_md2_process()
124 ctx->state[i + 16] = ctx->buffer[i]; in mbedtls_md2_process()
125 ctx->state[i + 32] = in mbedtls_md2_process()
126 (unsigned char)( ctx->buffer[i] ^ ctx->state[i]); in mbedtls_md2_process()
129 for( i = 0; i < 18; i++ ) in mbedtls_md2_process()
138 t = (unsigned char)( t + i ); in mbedtls_md2_process()
143 for( i = 0; i < 16; i++ ) in mbedtls_md2_process()
145 ctx->cksum[i] = (unsigned char) in mbedtls_md2_process()
146 ( ctx->cksum[i] ^ PI_SUBST[ctx->buffer[i] ^ t] ); in mbedtls_md2_process()
[all …]
Darc4.c74 int i, j, a; in mbedtls_arc4_setup() local
82 for( i = 0; i < 256; i++ ) in mbedtls_arc4_setup()
83 m[i] = (unsigned char) i; in mbedtls_arc4_setup()
87 for( i = 0; i < 256; i++, k++ ) in mbedtls_arc4_setup()
91 a = m[i]; in mbedtls_arc4_setup()
93 m[i] = m[j]; in mbedtls_arc4_setup()
105 size_t i; in mbedtls_arc4_crypt() local
112 for( i = 0; i < length; i++ ) in mbedtls_arc4_crypt()
120 output[i] = (unsigned char) in mbedtls_arc4_crypt()
121 ( input[i] ^ m[(unsigned char)( a + b )] ); in mbedtls_arc4_crypt()
[all …]
Dsha512.c68 #define GET_UINT64_BE(n,b,i) \ argument
70 (n) = ( (uint64_t) (b)[(i) ] << 56 ) \
71 | ( (uint64_t) (b)[(i) + 1] << 48 ) \
72 | ( (uint64_t) (b)[(i) + 2] << 40 ) \
73 | ( (uint64_t) (b)[(i) + 3] << 32 ) \
74 | ( (uint64_t) (b)[(i) + 4] << 24 ) \
75 | ( (uint64_t) (b)[(i) + 5] << 16 ) \
76 | ( (uint64_t) (b)[(i) + 6] << 8 ) \
77 | ( (uint64_t) (b)[(i) + 7] ); \
82 #define PUT_UINT64_BE(n,b,i) \ argument
[all …]
Dbignum.c76 #define BITS_TO_LIMBS(i) ( (i) / biL + ( (i) % biL != 0 ) ) argument
77 #define CHARS_TO_LIMBS(i) ( (i) / ciL + ( (i) % ciL != 0 ) ) argument
147 size_t i; in mbedtls_mpi_shrink() local
153 for( i = X->n - 1; i > 0; i-- ) in mbedtls_mpi_shrink()
154 if( X->p[i] != 0 ) in mbedtls_mpi_shrink()
156 i++; in mbedtls_mpi_shrink()
158 if( i < nblimbs ) in mbedtls_mpi_shrink()
159 i = nblimbs; in mbedtls_mpi_shrink()
161 if( ( p = (mbedtls_mpi_uint*)mbedtls_calloc( i, ciL ) ) == NULL ) in mbedtls_mpi_shrink()
166 memcpy( p, X->p, i * ciL ); in mbedtls_mpi_shrink()
[all …]
Dbase64.c80 size_t i, n; in mbedtls_base64_encode() local
108 for( i = 0, p = dst; i < n; i += 3 ) in mbedtls_base64_encode()
120 if( i < slen ) in mbedtls_base64_encode()
123 C2 = ( ( i + 1 ) < slen ) ? *src++ : 0; in mbedtls_base64_encode()
128 if( ( i + 1 ) < slen ) in mbedtls_base64_encode()
147 size_t i, n; in mbedtls_base64_decode() local
152 for( i = n = j = 0; i < slen; i++ ) in mbedtls_base64_decode()
156 while( i < slen && src[i] == ' ' ) in mbedtls_base64_decode()
158 ++i; in mbedtls_base64_decode()
163 if( i == slen ) in mbedtls_base64_decode()
[all …]
Ddebug.c147 size_t i, idx = 0; in mbedtls_debug_print_buf() local
159 for( i = 0; i < len; i++ ) in mbedtls_debug_print_buf()
161 if( i >= 4096 ) in mbedtls_debug_print_buf()
164 if( i % 16 == 0 ) in mbedtls_debug_print_buf()
166 if( i > 0 ) in mbedtls_debug_print_buf()
176 (unsigned int) i ); in mbedtls_debug_print_buf()
181 (unsigned int) buf[i] ); in mbedtls_debug_print_buf()
182 txt[i % 16] = ( buf[i] > 31 && buf[i] < 127 ) ? buf[i] : '.' ; in mbedtls_debug_print_buf()
187 for( /* i = i */; i % 16 != 0; i++ ) in mbedtls_debug_print_buf()
220 size_t i, n, idx = 0; in mbedtls_debug_print_mpi() local
[all …]
Dhavege.c86 i = 0; \
87 A = &WALK[PT1 ]; RES[i++] ^= *A; \
88 B = &WALK[PT2 ]; RES[i++] ^= *B; \
89 C = &WALK[PT1 ^ 1]; RES[i++] ^= *C; \
90 D = &WALK[PT2 ^ 4]; RES[i++] ^= *D; \
98 A = &WALK[PT1 ^ 2]; RES[i++] ^= *A; \
99 B = &WALK[PT2 ^ 2]; RES[i++] ^= *B; \
100 C = &WALK[PT1 ^ 3]; RES[i++] ^= *C; \
101 D = &WALK[PT2 ^ 6]; RES[i++] ^= *D; \
116 PT2 = (RES[(i - 8) ^ PTY] ^ WALK[PT2 ^ PTY ^ 7]); \
[all …]
Dpkcs12.c98 size_t i; in pkcs12_pbe_derive_key_iv() local
111 for( i = 0; i < pwdlen; i++ ) in pkcs12_pbe_derive_key_iv()
112 unipwd[i * 2 + 1] = pwd[i]; in pkcs12_pbe_derive_key_iv()
262 size_t hlen, use_len, v, i; in mbedtls_pkcs12_derivation() local
311 for( i = 1; i < (size_t) iterations; i++ ) in mbedtls_pkcs12_derivation()
329 for( i = v; i > 0; i-- ) in mbedtls_pkcs12_derivation()
330 if( ++hash_block[i - 1] != 0 ) in mbedtls_pkcs12_derivation()
335 for( i = v; i > 0; i-- ) in mbedtls_pkcs12_derivation()
337 j = salt_block[i - 1] + hash_block[i - 1] + c; in mbedtls_pkcs12_derivation()
339 salt_block[i - 1] = j & 0xFF; in mbedtls_pkcs12_derivation()
[all …]
/net-tools-3.5.0/virtual-hub/src/
Dhub.c93 for (int i = 0; i < number_nodes; i++) { in dealloc_size() local
94 free(buffer[i]); in dealloc_size()
95 free(send[i]); in dealloc_size()
96 free(pipe_in[i]); in dealloc_size()
97 free(pipe_out[i]); in dealloc_size()
110 for (int i = 0; i < number_nodes; i++) { in setup_reachable_nodes() local
111 if (m[pos][i] > channel_statistic_send) { in setup_reachable_nodes()
112 send[pos][i] = TRUE; in setup_reachable_nodes()
119 for (int i = 0; i < number_nodes; i++) { in reset_reachable_nodes() local
120 send[pos][i] = FALSE; in reset_reachable_nodes()
[all …]
Dgraphs.c22 for (int i = 0; i < length; i++) { in free_memory() local
23 free(m[i]); in free_memory()
33 for (int i = 0; i < n; i++) { in create_matrix() local
34 matrix[i] = (float *)malloc(n * sizeof(float)); in create_matrix()
36 matrix[i][j] = 0.0; in create_matrix()
64 for (int i = 0; i < n; i++) { in print_matrix() local
66 printf(" %1.2f ", m[i][j]); in print_matrix()
/net-tools-3.5.0/libcoap/src/
Dencode.c17 int coap_fls(unsigned int i) { in coap_fls() argument
19 for (n = 0; i; n++) in coap_fls()
20 i >>= 1; in coap_fls()
26 unsigned int i, n = 0; in coap_decode_var_bytes() local
27 for (i = 0; i < len; ++i) in coap_decode_var_bytes()
28 n = (n << 8) + buf[i]; in coap_decode_var_bytes()
35 unsigned int n, i; in coap_encode_var_bytes() local
37 for (n = 0, i = val; i && n < sizeof(val); ++n) in coap_encode_var_bytes()
38 i >>= 8; in coap_encode_var_bytes()
40 i = n; in coap_encode_var_bytes()
[all …]
/net-tools-3.5.0/
Dtunslip6.c155 int i; in is_sensible_string() local
156 for(i = 1; i < len; i++) { in is_sensible_string()
157 if(s[i] == 0 || s[i] == '\r' || s[i] == '\n' || s[i] == '\t') { in is_sensible_string()
159 } else if(s[i] < ' ' || '~' < s[i]) { in is_sensible_string()
178 int ret,i; in serial_to_tun() local
219 int i, pos; in serial_to_tun() local
220 for(i = 0, pos = 0; i < 16; i++) { in serial_to_tun()
221 macs[pos++] = uip.inbuf[2 + i]; in serial_to_tun()
222 if((i & 1) == 1 && i < 14) { in serial_to_tun()
243 int i; in serial_to_tun() local
[all …]
/net-tools-3.5.0/tinydtls-0.8.2/
Dccm.c42 int i; \
45 for (i = DTLS_CCM_BLOCKSIZE - 1; (C) && (i > (L)); --i, (C) >>= 8) \
46 (A)[i] |= (C) & 0xFF; \
56 int i; in block0() local
63 for (i=0; i < L; i++) { in block0()
64 result[15-i] = lm & 0xff; in block0()
87 size_t i,j; in add_auth_data() local
122 i = min(DTLS_CCM_BLOCKSIZE - j, la); in add_auth_data()
123 memcpy(B + j, msg, i); in add_auth_data()
124 la -= i; in add_auth_data()
[all …]
Dhmac.c95 int i; in dtls_hmac_init() local
109 for (i=0; i < DTLS_HMAC_BLOCKSIZE; ++i) in dtls_hmac_init()
110 ctx->pad[i] ^= 0x36; in dtls_hmac_init()
116 for (i=0; i < DTLS_HMAC_BLOCKSIZE; ++i) in dtls_hmac_init()
117 ctx->pad[i] ^= 0x6A; in dtls_hmac_init()
150 size_t len, i; in main() local
165 for(i = 0; i < len; i++) in main()
166 printf("%02x", buf[i]); in main()
/net-tools-3.5.0/mbedtls-2.4.0/programs/hash/
Dgeneric_sum.c65 int i; in generic_print() local
71 for( i = 0; i < mbedtls_md_get_size( md_info ); i++ ) in generic_print()
72 mbedtls_printf( "%02x", sum[i] ); in generic_print()
80 int i; in generic_check() local
136 for( i = 0; i < mbedtls_md_get_size( md_info ); i++ ) in generic_check()
137 sprintf( buf + i * 2, "%02x", sum[i] ); in generic_check()
141 for( i = 0; i < 2 * mbedtls_md_get_size( md_info ); i++ ) in generic_check()
142 diff |= line[i] ^ buf[i]; in generic_check()
172 int ret, i; in main() local
224 for( i = 2; i < argc; i++ ) in main()
[all …]
/net-tools-3.5.0/mbedtls-2.4.0/programs/aes/
Daescrypt2.c76 unsigned int i, n; in main() local
230 for( i = 0; i < 8; i++ ) in main()
231 buffer[i] = (unsigned char)( filesize >> ( i << 3 ) ); in main()
267 for( i = 0; i < 8192; i++ ) in main()
293 for( i = 0; i < 16; i++ ) in main()
294 buffer[i] = (unsigned char)( buffer[i] ^ IV[i] ); in main()
369 for( i = 0; i < 8192; i++ ) in main()
397 for( i = 0; i < 16; i++ ) in main()
398 buffer[i] = (unsigned char)( buffer[i] ^ IV[i] ); in main()
425 for( i = 0; i < 32; i++ ) in main()
[all …]
/net-tools-3.5.0/tinydtls-0.8.2/examples/contiki/
Ddtls-server.c84 size_t i; in read_from_peer() local
85 for (i = 0; i < len; i++) in read_from_peer()
86 PRINTF("%c", data[i]); in read_from_peer()
144 int i; in get_psk_info() local
145 for (i = 0; i < sizeof(psk)/sizeof(struct keymap_t); i++) { in get_psk_info()
146 if (id_len == psk[i].id_length && memcmp(id, psk[i].id, id_len) == 0) { in get_psk_info()
147 if (result_length < psk[i].key_length) { in get_psk_info()
152 memcpy(result, psk[i].key, psk[i].key_length); in get_psk_info()
153 return psk[i].key_length; in get_psk_info()
207 int i; in print_local_addresses() local
[all …]
/net-tools-3.5.0/mbedtls-2.4.0/programs/
Dwince_main.c31 int i; in _tmain() local
35 for ( i = 0; i < argc; i++ ) { in _tmain()
37 len = _tcslen( targv[i] ) + 1; in _tmain()
38 argv[i] = ( char * ) calloc( len, sizeof( char ) ); in _tmain()
39 wcstombs( argv[i], targv[i], len ); in _tmain()

123456