public synchronized byte[] initialize(IntValue value) {
        if (!LoggedIn || Initialized) {
            return null;
        }
        byte[] key = new byte[256];
        Rnd.nextBytes(key);
        byte[] encKey = null;
        try {
            encKey = Cipher.encData(key, 0, key.length);
        } catch (IOException ex) {
            ex.printStackTrace();
            return null;
        }
        RC4Cipher cipher = new RC4Cipher(key);
        LogoffSpell = cipher.encData(HadukiCode.LOGOFF_SPELL.clone(), 0,
                                     HadukiCode.LOGOFF_SPELL.length);
        Initialized = true;
        value.setValue(MaxChannel);
        return encKey;
    }