/* 
#  This is version 0.3 of absent
#
#               Copyright (c) 1999 by AT&T.
#  Permission to use, copy, and modify this software without fee is
#  hereby granted, provided that this entire notice is included in all
#  copies of any software which is or includes a copy or modification
#  of this software and in all copies of the supporting documentation
#  for such software.
#
#  SOME PARTS OF ABSENT MAY BE RESTRICTED UNDER UNITED STATES EXPORT
#  REGULATIONS.
#
#  THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
#  IMPLIED WARRANTY.  IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE
#  ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
#  MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
#  PURPOSE.
*/
#include "keys.h"

void main(argc,argv)
int argc;
char **argv;
{
   C_Block key;
   long counter;

   if(argc == 2)
     counter=0;
   else if(argc == 3)
     counter=atoi(argv[2]);
   else {
     fprintf(stderr, "Usage: %s file [counter]\n", argv[0]);
     fprintf(stderr, "If counter is provided and greater than 0, it will\n");
     fprintf(stderr, "be prepended to the key in file\n");
     exit(1);
   }
   gen_master_key(key);
   store_key(counter, key, argv[1]);
}

