public synchronized void initializeSecureLogHelper(String loggerFileName,AMPassword LoggerPassword,String verFileName,AMPassword verifierPassword) throws Exception {
  logFileName=loggerFileName;
  verifierFileName=verFileName;
  loggerPass=LoggerPassword;
  AMPassword tempVerifierPass=verifierPassword;
  loggerInitialized=isInitialized(loggerFileName,loggerPass);
  if (!loggerInitialized) {
    initializeKeyStoreManager(LoggerPassword);
    KeyGenerator keygen=KeyGenerator.getInstance("DESede");
    SecretKey k0=keygen.generateKey();
    currentLoggerKey=k0.getEncoded();
    writeToSecretStore(currentLoggerKey,loggerFileName,loggerPass,initialKey);
    loggerInitialized=true;
    writeToSecretStore(currentLoggerKey,loggerFileName,loggerPass,currentKey);
    writeToSecretStore(currentLoggerKey,verifierFileName,tempVerifierPass,initialKey);
  }
 else {
    if (Debug.messageEnabled()) {
      Debug.message(logFileName + " Logger Module is already " + " initialized");
    }
    currentLoggerKey=readFromSecretStore(loggerFileName,currentKey,loggerPass);
  }
}

public synchronized void initializeSecureLogHelper ( String loggerFileName , AMPassword LoggerPassword , String verFileName , AMPassword verifierPassword ) throws Exception { logFileName = loggerFileName ; verifierFileName = verFileName ; loggerPass = LoggerPassword ; AMPassword tempVerifierPass = verifierPassword ; loggerInitialized = isInitialized ( loggerFileName , loggerPass ) ; if ( ! loggerInitialized ) { initializeKeyStoreManager ( LoggerPassword ) ; KeyGenerator keygen = KeyGenerator . getInstance ( "DESede" ) ; SecretKey k0 = keygen . generateKey ( ) ; currentLoggerKey = k0 . getEncoded ( ) ; writeToSecretStore ( currentLoggerKey , loggerFileName , loggerPass , initialKey ) ; loggerInitialized = true ; writeToSecretStore ( currentLoggerKey , loggerFileName , loggerPass , currentKey ) ; writeToSecretStore ( currentLoggerKey , verifierFileName , tempVerifierPass , initialKey ) ; } else { if ( Debug . messageEnabled ( ) ) { Debug . message ( logFileName + " Logger Module is already " + " initialized" ) ; } currentLoggerKey = readFromSecretStore ( loggerFileName , currentKey , loggerPass ) ; } }
initialize logger by generating a new macing key and storing it in the secure storage also creates a file for the verifier with the same password . this file is overwritten with a new verifier ( auditor ) supplied password when the auditor logs into the system for the first time this method should be called only once for a given initial key
