keyStore = KeyStore.getInstance("nCipher.sworld"); try { keyStore.load(new ByteArrayInputStream(sSlotLabel.getBytes()), null); } catch( Exception e) { log.debug("Preload maybe not called. Assuming 1/N. Exception was:",e); keyStore.load(new ByteArrayInputStream(sSlotLabel.getBytes()), authCode.toCharArray()); }
if ( keyStore==null ) keyStore = getKeyStore(authCode);
    public void activate(String authCode) throws CATokenOfflineException, CATokenAuthenticationFailedException {        try {            keyStore = KeyStore.getInstance("nCipher.sworld");            try {                keyStore.load(new ByteArrayInputStream(sSlotLabel.getBytes()),                              null);            } catch( Exception e) {                log.debug("Preload maybe not called. Assuming 1/N. Exception was:",e);                keyStore.load(new ByteArrayInputStream(sSlotLabel.getBytes()),                              authCode.toCharArray());            }            setKeys(keyStore, authCode);            log.debug("Keys from "+sSlotLabel+ " activated.");        } catch( Throwable t ) {            log.debug("Authentication failed for keystore "+sSlotLabel+':', t );            CATokenAuthenticationFailedException e = new CATokenAuthenticationFailedException(t.toString());            e.initCause(t);            deactivate();            throw e;        }    }