Home
last modified time | relevance | path

Searched refs:char (Results 1 – 25 of 47) sorted by relevance

12

/net-tools-3.7.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_aes.function11 void aes_encrypt_ecb( char *hex_key_string, char *hex_src_string,
12 char *hex_dst_string, int setkey_result )
14 unsigned char key_str[100];
15 unsigned char src_str[100];
16 unsigned char dst_str[100];
17 unsigned char output[100];
36 TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
45 void aes_decrypt_ecb( char *hex_key_string, char *hex_src_string,
46 char *hex_dst_string, int setkey_result )
48 unsigned char key_str[100];
[all …]
Dtest_suite_blowfish.function11 void blowfish_encrypt_ecb( char *hex_key_string, char *hex_src_string,
12 char *hex_dst_string, int setkey_result )
14 unsigned char key_str[100];
15 unsigned char src_str[100];
16 unsigned char dst_str[100];
17 unsigned char output[100];
36 TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
45 void blowfish_decrypt_ecb( char *hex_key_string, char *hex_src_string,
46 char *hex_dst_string, int setkey_result )
48 unsigned char key_str[100];
[all …]
Dtest_suite_camellia.function11 void camellia_encrypt_ecb( char *hex_key_string, char *hex_src_string,
12 char *hex_dst_string, int setkey_result )
14 unsigned char key_str[100];
15 unsigned char src_str[100];
16 unsigned char dst_str[100];
17 unsigned char output[100];
36 TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
45 void camellia_decrypt_ecb( char *hex_key_string, char *hex_src_string,
46 char *hex_dst_string, int setkey_result )
48 unsigned char key_str[100];
[all …]
Dtest_suite_des.function11 void des_check_weak( char *key_hex, int ret )
13 unsigned char key[MBEDTLS_DES_KEY_SIZE];
24 void des_encrypt_ecb( char *hex_key_string, char *hex_src_string,
25 char *hex_dst_string )
27 unsigned char key_str[100];
28 unsigned char src_str[100];
29 unsigned char dst_str[100];
30 unsigned char output[100];
46 TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
54 void des_decrypt_ecb( char *hex_key_string, char *hex_src_string,
[all …]
Dtest_suite_xtea.function11 void xtea_encrypt_ecb( char *hex_key_string, char *hex_src_string,
12 char *hex_dst_string )
14 unsigned char key_str[100];
15 unsigned char src_str[100];
16 unsigned char dst_str[100];
17 unsigned char output[100];
32 TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
37 void xtea_decrypt_ecb( char *hex_key_string, char *hex_src_string,
38 char *hex_dst_string )
40 unsigned char key_str[100];
[all …]
Dtest_suite_mdx.function9 void md2_text( char *text_src_string, char *hex_hash_string )
11 unsigned char src_str[100];
12 unsigned char hash_str[33];
13 unsigned char output[16];
19 strncpy( (char *) src_str, text_src_string, sizeof(src_str) - 1 );
21 mbedtls_md2( src_str, strlen( (char *) src_str ), output );
24 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );
29 void md4_text( char *text_src_string, char *hex_hash_string )
31 unsigned char src_str[100];
32 unsigned char hash_str[33];
[all …]
Dtest_suite_shax.function8 void mbedtls_sha1( char *hex_src_string, char *hex_hash_string )
10 unsigned char src_str[10000];
11 unsigned char hash_str[10000];
12 unsigned char output[41];
24 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );
29 void sha224(char *hex_src_string, char *hex_hash_string )
31 unsigned char src_str[10000];
32 unsigned char hash_str[10000];
33 unsigned char output[57];
45 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );
[all …]
Dtest_suite_gcm.function12 char *hex_key_string, char *hex_src_string,
13 char *hex_iv_string, char *hex_add_string,
14 char *hex_dst_string, int tag_len_bits,
15 char *hex_tag_string, int init_result )
17 unsigned char key_str[128];
18 unsigned char src_str[128];
19 unsigned char dst_str[257];
20 unsigned char iv_str[128];
21 unsigned char add_str[128];
22 unsigned char tag_str[128];
[all …]
Dtest_suite_cmac.function23 unsigned char test_key[MBEDTLS_CIPHER_BLKSIZE_MAX];
24 unsigned char test_data[MBEDTLS_CIPHER_BLKSIZE_MAX];
25 unsigned char test_output[MBEDTLS_CIPHER_BLKSIZE_MAX];
106 unsigned char key[32];
107 unsigned char buf[16];
108 unsigned char tmp[16];
124 char *key_string, int keybits,
126 char *block1_string, int block1_len,
127 char *block2_string, int block2_len,
128 char *block3_string, int block3_len,
[all …]
Dtest_suite_md.function16 unsigned char buf[150];
47 unsigned char buf[1] = { 0 };
106 void md_info( int md_type, char *md_name, int md_size )
117 TEST_ASSERT( mbedtls_md_get_size( md_info ) == (unsigned char) md_size );
129 void md_text( char *text_md_name, char *text_src_string, char *hex_hash_string )
131 char md_name[100];
132 unsigned char src_str[1000];
133 unsigned char hash_str[1000];
134 unsigned char output[100];
142 strncpy( (char *) src_str, text_src_string, sizeof( src_str ) - 1 );
[all …]
Dtest_suite_base64.function11 void mbedtls_base64_encode( char *src_string, char *dst_string, int dst_buf_size,
14 unsigned char src_str[1000];
15 unsigned char dst_str[1000];
21 strncpy( (char *) src_str, src_string, sizeof(src_str) - 1 );
22 …TEST_ASSERT( mbedtls_base64_encode( dst_str, dst_buf_size, &len, src_str, strlen( (char *) src_str…
25 TEST_ASSERT( strcmp( (char *) dst_str, dst_string ) == 0 );
31 void mbedtls_base64_decode( char *src_string, char *dst_string, int result )
33 unsigned char src_str[1000];
34 unsigned char dst_str[1000];
41 strncpy( (char *) src_str, src_string, sizeof(src_str) - 1 );
[all …]
Dtest_suite_pkcs1_v15.function12 void pkcs1_rsaes_v15_encrypt( int mod, int radix_N, char *input_N, int radix_E,
13 char *input_E, int hash,
14 char *message_hex_string, char *seed,
15 char *result_hex_str, int result )
17 unsigned char message_str[1000];
18 unsigned char output[1000];
19 unsigned char output_str[1000];
20 unsigned char rnd_buf[1000];
46 TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 );
55 void pkcs1_rsaes_v15_decrypt( int mod, int radix_P, char *input_P,
[all …]
Dtest_suite_pkcs1_v21.function12 void pkcs1_rsaes_oaep_encrypt( int mod, int radix_N, char *input_N, int radix_E,
13 char *input_E, int hash,
14 char *message_hex_string, char *seed,
15 char *result_hex_str, int result )
17 unsigned char message_str[1000];
18 unsigned char output[1000];
19 unsigned char output_str[1000];
20 unsigned char rnd_buf[1000];
46 TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 );
55 void pkcs1_rsaes_oaep_decrypt( int mod, int radix_P, char *input_P,
[all …]
Dtest_suite_x509parse.function44 char *mystrsep(char **stringp, const char *delim)
46 const char *p;
47 char *ret = *stringp;
75 char buf[512];
76 char *p;
89 char *p = ctx->p;
121 void x509_cert_info( char *crt_file, char *result_str )
124 char buf[2000];
144 void mbedtls_x509_crl_info( char *crl_file, char *result_str )
147 char buf[2000];
[all …]
Dtest_suite_rsa.function19 void mbedtls_rsa_pkcs1_sign( char *message_hex_string, int padding_mode, int digest,
20 int mod, int radix_P, char *input_P, int radix_Q,
21 char *input_Q, int radix_N, char *input_N, int radix_E,
22 char *input_E, char *result_hex_str, int result )
24 unsigned char message_str[1000];
25 unsigned char hash_result[1000];
26 unsigned char output[1000];
27 unsigned char output_str[1000];
69 TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 );
79 void mbedtls_rsa_pkcs1_verify( char *message_hex_string, int padding_mode, int digest,
[all …]
Dtest_suite_ctr_drbg.function5 int mbedtls_entropy_func( void *data, unsigned char *buf, size_t len )
7 const unsigned char *p = (unsigned char *) data;
23 unsigned char output[512];
24 unsigned char additional[512];
48 void ctr_drbg_validate_pr( char *add_init_string, char *entropy_string,
49 char *add1_string, char *add2_string,
50 char *result_str )
52 unsigned char entropy[512];
53 unsigned char add_init[512];
54 unsigned char add1[512];
[all …]
Dtest_suite_hmac_drbg.function6 unsigned char *p;
10 int mbedtls_entropy_func( void *data, unsigned char *buf, size_t len )
34 unsigned char out[16];
35 unsigned char buf[1024];
112 void hmac_drbg_seed_file( int md_alg, char *path, int ret )
136 unsigned char out[16];
137 unsigned char buf[100];
164 char *entropy_hex, char *custom_hex,
165 char *add1_hex, char *add2_hex,
166 char *output_hex )
[all …]
Dtest_suite_ccm.function21 unsigned char key[32];
41 unsigned char key[16];
42 unsigned char msg[10];
43 unsigned char iv[14];
44 unsigned char add[10];
45 unsigned char out[10];
46 unsigned char tag[18];
79 char *key_hex, char *msg_hex,
80 char *iv_hex, char *add_hex,
81 char *result_hex )
[all …]
Dtest_suite_debug.function6 char buf[2000];
7 char *ptr;
10 void string_debug(void *data, int level, const char *file, int line, const char *str)
13 char *p = buffer->ptr;
50 void debug_print_msg_threshold( int threshold, int level, char *file, int line,
51 char *result_str )
79 void mbedtls_debug_print_ret( char *file, int line, char *text, int value,
80 char *result_str )
106 void mbedtls_debug_print_buf( char *file, int line, char *text,
107 char *data_string, char *result_str )
[all …]
Dtest_suite_mpi.function30 void mpi_read_write_string( int radix_X, char *input_X, int radix_A,
31 char *input_A, int output_size, int result_read,
35 char str[1000];
56 void mbedtls_mpi_read_binary( char *input_X, int radix_A, char *input_A )
59 unsigned char str[1000];
60 unsigned char buf[1000];
69 TEST_ASSERT( mbedtls_mpi_write_string( &X, radix_A, (char *) str, sizeof( str ), &len ) == 0 );
70 TEST_ASSERT( strcmp( (char *) str, input_A ) == 0 );
78 void mbedtls_mpi_write_binary( int radix_X, char *input_X, char *input_A,
82 unsigned char str[1000];
[all …]
Dtest_suite_pem.function12 void mbedtls_pem_write_buffer( char *start, char *end, char *buf_str, char *result_str )
14 unsigned char buf[5000];
15 unsigned char *check_buf = NULL;
26 check_buf = (unsigned char *) mbedtls_calloc( 1, olen );
33 TEST_ASSERT( olen > strlen( (char*) result_str ) );
35 TEST_ASSERT( strncmp( (char *) check_buf, (char *) result_str, olen ) == 0 );
Dtest_suite_pkcs5.function11 void pbkdf2_hmac( int hash, char *hex_password_string,
12 char *hex_salt_string, int it_cnt, int key_len,
13 char *result_key_string )
15 unsigned char pw_str[100];
16 unsigned char salt_str[100];
17 unsigned char dst_str[100];
23 unsigned char key[100];
42 TEST_ASSERT( strcmp( (char *) dst_str, result_key_string ) == 0 );
50 void mbedtls_pkcs5_pbes2( int params_tag, char *params_hex, char *pw_hex,
51 char *data_hex, int ref_ret, char *ref_out_hex )
[all …]
Dtest_suite_x509write.function14 void x509_csr_check( char *key_file, char *cert_req_check_file,
19 unsigned char buf[4096];
20 unsigned char check_buf[4000];
25 const char *subject_name = "C=NL,O=PolarSSL,CN=PolarSSL Server 1";
46 pem_len = strlen( (char *) buf );
74 void x509_crt_check( char *subject_key_file, char *subject_pwd,
75 char *subject_name, char *issuer_key_file,
76 char *issuer_pwd, char *issuer_name,
77 char *serial_str, char *not_before, char *not_after,
79 char *cert_check_file )
[all …]
Dtest_suite_pkwrite.function13 void pk_write_pubkey_check( char *key_file )
16 unsigned char buf[5000];
17 unsigned char check_buf[5000];
36 TEST_ASSERT( ilen == strlen( (char *) buf ) );
37 TEST_ASSERT( memcmp( (char *) buf, (char *) check_buf, ilen ) == 0 );
45 void pk_write_key_check( char *key_file )
48 unsigned char buf[5000];
49 unsigned char check_buf[5000];
68 TEST_ASSERT( ilen == strlen( (char *) buf ) );
69 TEST_ASSERT( memcmp( (char *) buf, (char *) check_buf, ilen ) == 0 );
Dtest_suite_memory_buffer_alloc.function39 unsigned char buf[1024];
40 unsigned char *ptr_a = NULL, *ptr_b = NULL, *ptr_c = NULL, *ptr_d = NULL,
52 ptr_a = mbedtls_calloc( a_bytes, sizeof(char) );
55 allocated_bytes += a_bytes * sizeof(char);
60 ptr_b = mbedtls_calloc( b_bytes, sizeof(char) );
63 allocated_bytes += b_bytes * sizeof(char);
68 ptr_c = mbedtls_calloc( c_bytes, sizeof(char) );
71 allocated_bytes += c_bytes * sizeof(char);
76 ptr_d = mbedtls_calloc( d_bytes, sizeof(char) );
79 allocated_bytes += d_bytes * sizeof(char);
[all …]

12