aboutsummaryrefslogtreecommitdiffstats
path: root/moon-abe/cpabe-0.11/ind.c.old
diff options
context:
space:
mode:
authorwukong <rebirthmonkey@gmail.com>2015-11-23 17:48:48 +0100
committerwukong <rebirthmonkey@gmail.com>2015-11-23 17:48:48 +0100
commitfca74d4bc3569506a6659880a89aa009dc11f552 (patch)
tree4cefd06af989608ea8ebd3bc6306889e2a1ad175 /moon-abe/cpabe-0.11/ind.c.old
parent840ac3ebca7af381132bf7e93c1e4c0430d6b16a (diff)
moon-abe cleanup
Change-Id: Ie1259856db03f0b9e80de3e967ec6bd1f03191b3
Diffstat (limited to 'moon-abe/cpabe-0.11/ind.c.old')
-rw-r--r--moon-abe/cpabe-0.11/ind.c.old98
1 files changed, 0 insertions, 98 deletions
diff --git a/moon-abe/cpabe-0.11/ind.c.old b/moon-abe/cpabe-0.11/ind.c.old
deleted file mode 100644
index e4002184..00000000
--- a/moon-abe/cpabe-0.11/ind.c.old
+++ /dev/null
@@ -1,98 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <glib.h>
-#include <pbc.h>
-#include <pbc_random.h>
-
-#include "bswabe.h"
-#include "common.h"
-
-char* usage =
-"Usage: peks-index [OPTION ...] PUB_KEY MSK_KEY IND\n"
-"\n"
-"Generate an encrypted index given a clear index IND.\n"
-"The clear index should be of the form:\n"
-"keyword_1\n"
-"keyword_2\n"
-"...\n"
-"It uses the public key PUB_KEY. The encrypted index will be written to the file \"encIndex\"\n"
-"unless the --output-index is used.\n"
-"\n"
-"Mandatory arguments to long options are mandatory for short options too.\n\n"
-" -h, --help print this message\n\n"
-" -v, --version print version information\n\n"
-" -i, --output-index FILE write index to FILE\n\n"
-"";
-
-char* msk_file = 0;
-char* pub_file = 0;
-char* ind_file = 0;
-char* out_file = 0;
-
-
-void
-parse_args( int argc, char** argv )
-{
- int i;
-
- for( i = 1; i < argc; i++ )
- if( !strcmp(argv[i], "-h") || !strcmp(argv[i], "--help") )
- {
- printf("%s", usage);
- exit(0);
- }
- else if( !strcmp(argv[i], "-v") || !strcmp(argv[i], "--version") )
- {
- printf(CPABE_VERSION, "-setup");
- exit(0);
- }
- else if( !strcmp(argv[i], "-i") || !strcmp(argv[i], "--output-index") )
- {
- if( ++i >= argc )
- die(usage);
- else
- out_file = argv[i];
- }
- else if( !pub_file )
- {
- pub_file = argv[i];
- }
- else if( !msk_file )
- {
- msk_file = argv[i];
- }
-
- else if( !ind_file )
- {
- ind_file = argv[i];
- }
-
- else
- die(usage);
-}
-
-int
-main( int argc, char** argv )
-{
- bswabe_pub_t* pub;
- bswabe_msk_t* msk;
- peks_ind_t* ind;
- peks_trap_t* trap;
-
-
- parse_args(argc, argv);
-
- /* Retrieve public key */
- pub = bswabe_pub_unserialize(suck_file(pub_file), 1);/*
- msk = bswabe_msk_unserialize(pub, suck_file(msk_file), 1);
-
- ind = peks_enc_ind( pub, ind_file );
- trap = peks_trap( pub, msk, "test" );
-
- if( !peks_test_ind( pub, ind, trap ))
- printf("The encrypted index contains the word test");
-*/
- return 0;
-}