Home
last modified time | relevance | path

Searched refs:argv (Results 1 – 25 of 70) sorted by relevance

123

/net-tools-2.7.6/mbedtls-2.4.0/programs/aes/
Daescrypt2.c72 int main( int argc, char *argv[] ) in main() argument
125 mode = atoi( argv[1] ); in main()
137 if( strcmp( argv[2], argv[3] ) == 0 ) in main()
143 if( ( fin = fopen( argv[2], "rb" ) ) == NULL ) in main()
145 mbedtls_fprintf( stderr, "fopen(%s,rb) failed\n", argv[2] ); in main()
149 if( ( fout = fopen( argv[3], "wb+" ) ) == NULL ) in main()
151 mbedtls_fprintf( stderr, "fopen(%s,wb+) failed\n", argv[3] ); in main()
158 if( ( fkey = fopen( argv[4], "rb" ) ) != NULL ) in main()
165 if( memcmp( argv[4], "hex:", 4 ) == 0 ) in main()
167 p = &argv[4][4]; in main()
[all …]
Dcrypt_and_hash.c74 int main( int argc, char *argv[] ) in main() argument
140 mode = atoi( argv[1] ); in main()
148 if( strcmp( argv[2], argv[3] ) == 0 ) in main()
154 if( ( fin = fopen( argv[2], "rb" ) ) == NULL ) in main()
156 mbedtls_fprintf( stderr, "fopen(%s,rb) failed\n", argv[2] ); in main()
160 if( ( fout = fopen( argv[3], "wb+" ) ) == NULL ) in main()
162 mbedtls_fprintf( stderr, "fopen(%s,wb+) failed\n", argv[3] ); in main()
169 cipher_info = mbedtls_cipher_info_from_string( argv[4] ); in main()
172 mbedtls_fprintf( stderr, "Cipher '%s' not found\n", argv[4] ); in main()
181 md_info = mbedtls_md_info_from_string( argv[5] ); in main()
[all …]
/net-tools-2.7.6/mbedtls-2.4.0/programs/
Dwince_main.c30 char **argv; in _tmain() local
33 argv = ( char ** ) calloc( argc, sizeof( char * ) ); in _tmain()
38 argv[i] = ( char * ) calloc( len, sizeof( char ) ); in _tmain()
39 wcstombs( argv[i], targv[i], len ); in _tmain()
42 return main( argc, argv ); in _tmain()
/net-tools-2.7.6/mbedtls-2.4.0/programs/pkey/
Drsa_verify_pss.c59 int main( int argc, char *argv[] ) in main() argument
82 mbedtls_printf( "\n . Reading public key from '%s'", argv[1] ); in main()
85 if( ( ret = mbedtls_pk_parse_public_keyfile( &pk, argv[1] ) ) != 0 ) in main()
87 mbedtls_printf( " failed\n ! Could not read key from '%s'\n", argv[1] ); in main()
105 mbedtls_snprintf( filename, 512, "%s.sig", argv[2] ); in main()
127 argv[2], hash ) ) != 0 ) in main()
129 mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); in main()
Dpk_encrypt.c59 int main( int argc, char *argv[] ) in main() argument
97 mbedtls_printf( "\n . Reading public key from '%s'", argv[1] ); in main()
102 if( ( ret = mbedtls_pk_parse_public_keyfile( &pk, argv[1] ) ) != 0 ) in main()
108 if( strlen( argv[2] ) > 100 ) in main()
114 memcpy( input, argv[2], strlen( argv[2] ) ); in main()
122 if( ( ret = mbedtls_pk_encrypt( &pk, input, strlen( argv[2] ), in main()
Dpk_sign.c59 int main( int argc, char *argv[] ) in main() argument
98 mbedtls_printf( "\n . Reading private key from '%s'", argv[1] ); in main()
101 if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 ) in main()
104 mbedtls_printf( " failed\n ! Could not open '%s'\n", argv[1] ); in main()
117 argv[2], hash ) ) != 0 ) in main()
119 mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); in main()
133 mbedtls_snprintf( filename, sizeof(filename), "%s.sig", argv[2] ); in main()
Drsa_sign_pss.c60 int main( int argc, char *argv[] ) in main() argument
99 mbedtls_printf( "\n . Reading private key from '%s'", argv[1] ); in main()
102 if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 ) in main()
105 mbedtls_printf( " failed\n ! Could not read key from '%s'\n", argv[1] ); in main()
128 argv[2], hash ) ) != 0 ) in main()
130 mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); in main()
144 mbedtls_snprintf( filename, 512, "%s.sig", argv[2] ); in main()
Dpk_verify.c55 int main( int argc, char *argv[] ) in main() argument
78 mbedtls_printf( "\n . Reading public key from '%s'", argv[1] ); in main()
81 if( ( ret = mbedtls_pk_parse_public_keyfile( &pk, argv[1] ) ) != 0 ) in main()
91 mbedtls_snprintf( filename, sizeof(filename), "%s.sig", argv[2] ); in main()
113 argv[2], hash ) ) != 0 ) in main()
115 mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); in main()
Drsa_encrypt.c61 int main( int argc, char *argv[] ) in main() argument
129 if( strlen( argv[1] ) > 100 ) in main()
136 memcpy( input, argv[1], strlen( argv[1] ) ); in main()
146 strlen( argv[1] ), input, buf ); in main()
Drsa_sign.c55 int main( int argc, char *argv[] ) in main() argument
125 argv[1], hash ) ) != 0 ) in main()
127 mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[1] ); in main()
141 mbedtls_snprintf( filename, sizeof(filename), "%s.sig", argv[1] ); in main()
146 mbedtls_printf( " failed\n ! Could not create %s\n\n", argv[1] ); in main()
Dpk_decrypt.c59 int main( int argc, char *argv[] ) in main() argument
70 ((void) argv); in main()
99 mbedtls_printf( "\n . Reading private key from '%s'", argv[1] ); in main()
104 if( ( ret = mbedtls_pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 ) in main()
Drsa_verify.c54 int main( int argc, char *argv[] ) in main() argument
104 mbedtls_snprintf( filename, sizeof(filename), "%s.sig", argv[1] ); in main()
134 argv[1], hash ) ) != 0 ) in main()
136 mbedtls_printf( " failed\n ! Could not open or read %s\n\n", argv[1] ); in main()
/net-tools-2.7.6/tinydtls-0.8.2/sha2/
Dsha2prog.c50 int main(int argc, char **argv) { in main() argument
69 if (*argv[ac] == '-') { in main()
70 av = argv[ac] + 1; in main()
82 usage(argv[0], "Invalid option."); in main()
86 file = argv[ac++]; in main()
88 usage(argv[0], "Too many arguments."); in main()
91 perror(argv[0]); in main()
Dsha2speed.c62 int main(int argc, char **argv) { in main() argument
74 usage(argv[0]); in main()
80 blocks = atoi(argv[1]); in main()
87 rep = atoi(argv[2]); in main()
92 memset(buf, atoi(argv[2]), BUFSIZE); in main()
/net-tools-2.7.6/mbedtls-2.4.0/programs/random/
Dgen_entropy.c49 int main( int argc, char *argv[] ) in main() argument
58 mbedtls_fprintf( stderr, "usage: %s <output filename>\n", argv[0] ); in main()
62 if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) in main()
64 mbedtls_printf( "failed to open '%s' for writing.\n", argv[1] ); in main()
82 "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); in main()
Dgen_random_havege.c50 int main( int argc, char *argv[] ) in main() argument
60 mbedtls_fprintf( stderr, "usage: %s <output filename>\n", argv[0] ); in main()
64 if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) in main()
66 mbedtls_printf( "failed to open '%s' for writing.\n", argv[1] ); in main()
87 "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); in main()
Dgen_random_ctr_drbg.c52 int main( int argc, char *argv[] ) in main() argument
64 mbedtls_fprintf( stderr, "usage: %s <output filename>\n", argv[0] ); in main()
68 if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) in main()
70 mbedtls_printf( "failed to open '%s' for writing.\n", argv[1] ); in main()
115 "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); in main()
/net-tools-2.7.6/mbedtls-2.4.0/programs/util/
Dstrerror.c54 int main( int argc, char *argv[] ) in main() argument
57 char *end = argv[1]; in main()
65 val = strtol( argv[1], &end, 10 ); in main()
68 val = strtol( argv[1], &end, 16 ); in main()
/net-tools-2.7.6/tinydtls-0.8.2/
Dhmac.c148 int main(int argc, char **argv) { in main() argument
154 fprintf(stderr, "usage: %s key text", argv[0]); in main()
159 ctx = dtls_hmac_new(argv[1], strlen(argv[1])); in main()
161 dtls_hmac_update(ctx, argv[2], strlen(argv[2])); in main()
/net-tools-2.7.6/mbedtls-2.4.0/programs/test/
Dbenchmark.c246 int main( int argc, char *argv[] ) in main() argument
266 if( strcmp( argv[i], "md4" ) == 0 ) in main()
268 else if( strcmp( argv[i], "md5" ) == 0 ) in main()
270 else if( strcmp( argv[i], "ripemd160" ) == 0 ) in main()
272 else if( strcmp( argv[i], "sha1" ) == 0 ) in main()
274 else if( strcmp( argv[i], "sha256" ) == 0 ) in main()
276 else if( strcmp( argv[i], "sha512" ) == 0 ) in main()
278 else if( strcmp( argv[i], "arc4" ) == 0 ) in main()
280 else if( strcmp( argv[i], "des3" ) == 0 ) in main()
282 else if( strcmp( argv[i], "des" ) == 0 ) in main()
[all …]
/net-tools-2.7.6/mbedtls-2.4.0/yotta/data/example-benchmark/
Dmain.cpp346 int benchmark( int argc, char *argv[] ) in benchmark() argument
366 if( strcmp( argv[i], "md4" ) == 0 ) in benchmark()
368 else if( strcmp( argv[i], "md5" ) == 0 ) in benchmark()
370 else if( strcmp( argv[i], "ripemd160" ) == 0 ) in benchmark()
372 else if( strcmp( argv[i], "sha1" ) == 0 ) in benchmark()
374 else if( strcmp( argv[i], "sha256" ) == 0 ) in benchmark()
376 else if( strcmp( argv[i], "sha512" ) == 0 ) in benchmark()
378 else if( strcmp( argv[i], "arc4" ) == 0 ) in benchmark()
380 else if( strcmp( argv[i], "des3" ) == 0 ) in benchmark()
382 else if( strcmp( argv[i], "des" ) == 0 ) in benchmark()
[all …]
/net-tools-2.7.6/mbedtls-2.4.0/programs/hash/
Dgeneric_sum.c170 int main( int argc, char *argv[] ) in main() argument
205 md_info = mbedtls_md_info_from_string( argv[1] ); in main()
208 mbedtls_fprintf( stderr, "Message Digest '%s' not found\n", argv[1] ); in main()
218 if( argc == 4 && strcmp( "-c", argv[2] ) == 0 ) in main()
220 ret |= generic_check( md_info, argv[3] ); in main()
225 ret |= generic_print( md_info, argv[i] ); in main()
/net-tools-2.7.6/
Dtcptest.py27 if len(sys.argv) != 3:
28 print("Usage: %s interface echo-server-ipv6-address" % sys.argv[0])
34 iface = sys.argv[1]
35 addr = sys.argv[2]
Dnet-capture.py30 argv = sys.argv[1:] variable
48 opts, args = getopt.getopt(argv,
/net-tools-2.7.6/libcoap/examples/
Dtiny.c100 main(int argc, char **argv) { in main() argument
107 if ( argc > 1 && strncmp(argv[1], "-h", 2) == 0 ) { in main()
108 usage( argv[0] ); in main()
120 inet_pton( AF_INET6, argc > 1 ? argv[1] : "::1", &dst.sin6_addr ); in main()

123