/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.EmptyInputStream
 *  com.l7tech.common.io.NullOutputStream
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.security.prov.JceProvider
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.FileUtils
 *  com.l7tech.util.FileUtils$Saver
 *  com.l7tech.util.Functions$UnaryVoid
 *  com.l7tech.util.NotFuture
 *  com.l7tech.util.ResourceUtils
 */
package com.l7tech.server.security.keystore.generic;

import com.l7tech.common.io.EmptyInputStream;
import com.l7tech.common.io.NullOutputStream;
import com.l7tech.objectmodel.Goid;
import com.l7tech.security.prov.JceProvider;
import com.l7tech.server.security.keystore.JdkKeyStoreBackedSsgKeyStore;
import com.l7tech.server.security.keystore.KeyAccessFilter;
import com.l7tech.server.security.keystore.SsgKeyFinder;
import com.l7tech.server.security.keystore.SsgKeyMetadataManager;
import com.l7tech.server.security.keystore.generic.a;
import com.l7tech.server.security.keystore.generic.b;
import com.l7tech.server.security.keystore.generic.c;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.FileUtils;
import com.l7tech.util.Functions;
import com.l7tech.util.NotFuture;
import com.l7tech.util.ResourceUtils;
import java.io.Closeable;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableKeyException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import java.util.logging.Logger;

public class GenericSsgKeyStore
extends JdkKeyStoreBackedSsgKeyStore {
    public static final String PROP_KEYSTORE_TYPE;
    public static final String DEFAULT_KEYSTORE_TYPE;
    public static final String PROP_LOAD_PATH;
    public static final String DEFAULT_LOAD_PATH;
    public static final String PROP_STORE_PATH;
    public static final String DEFAULT_STORE_PATH;
    public static final String PROP_KEYSTORE_PASSWORD;
    public static final String DEFAULT_KEYSTORE_PASSWORD;
    public static final String PROP_ENTRY_PASSWORD;
    public static final String DEFAULT_ENTRY_PASSWORD;
    public static final String PROP_READ_ONLY;
    public static final boolean DEFAULT_READ_ONLY = false;
    public static final String PROP_STORE_AFTER_CHANGE;
    public static final boolean DEFAULT_STORE_AFTER_CHANGE = true;
    public static final String PROP_SAVE_FILE_SAFELY;
    public static final boolean DEFAULT_SAVE_FILE_SAFELY = true;
    public static final String PROP_RELOAD_AFTER_STORE;
    public static final boolean DEFAULT_RELOAD_AFTER_STORE = false;
    private static Logger i;
    private final Goid j;
    private final SsgKeyFinder.SsgKeyStoreType k;
    private final String l;
    private final String m;
    private final String n;
    private final String o;
    private final char[] p;
    private final char[] q;
    private final boolean r;
    private final boolean s;
    private final boolean t;
    private final boolean u;
    private final AtomicReference<KeyStore> v = new AtomicReference();
    private static final String[] w;

    public GenericSsgKeyStore(Goid goid, SsgKeyFinder.SsgKeyStoreType ssgKeyStoreType, String string, char[] cArray, KeyAccessFilter keyAccessFilter, SsgKeyMetadataManager ssgKeyMetadataManager) throws KeyStoreException {
        super(keyAccessFilter, ssgKeyMetadataManager);
        this.j = goid;
        this.k = ssgKeyStoreType;
        this.l = string;
        String[] stringArray = w;
        this.p = GenericSsgKeyStore.a(stringArray[10], stringArray[29], cArray);
        this.q = GenericSsgKeyStore.a(stringArray[21], stringArray[29], this.p);
        this.m = ConfigFactory.getProperty((String)stringArray[16], (String)stringArray[27]);
        this.n = ConfigFactory.getProperty((String)stringArray[9], (String)stringArray[24]);
        String string2 = ConfigFactory.getProperty((String)stringArray[35], (String)stringArray[29]);
        if (stringArray[29].equalsIgnoreCase(string2)) {
            string2 = this.n;
        }
        this.o = string2;
        stringArray = w;
        this.r = ConfigFactory.getBooleanProperty((String)stringArray[2], (boolean)false);
        this.s = ConfigFactory.getBooleanProperty((String)stringArray[18], (boolean)true);
        this.t = ConfigFactory.getBooleanProperty((String)stringArray[4], (boolean)true);
        this.u = ConfigFactory.getBooleanProperty((String)stringArray[26], (boolean)false);
        i.info(stringArray[15] + this.m + stringArray[23] + this.n);
    }

    private static KeyStore a(String string, boolean bl2, String string2, char[] cArray) throws KeyStoreException {
        KeyStore keyStore = JceProvider.getInstance().getKeyStore(string);
        try {
            GenericSsgKeyStore.a(string2, bl2, new a(keyStore, cArray));
        }
        catch (IOException iOException) {
            throw new KeyStoreException(iOException);
        }
        catch (RuntimeException runtimeException) {
            throw new KeyStoreException(runtimeException);
        }
        return keyStore;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Unable to fully structure code
     */
    private static void a(String var0, boolean var1_1, Functions.UnaryVoid<InputStream> var2_2) throws IOException {
        block11: {
            block13: {
                block12: {
                    block10: {
                        if (GenericSsgKeyStore.w[24].equalsIgnoreCase(var0)) ** GOTO lbl8
                        try {
                            block14: {
                                if (!GenericSsgKeyStore.w[3].equalsIgnoreCase(var0)) break block10;
                                break block14;
                                catch (IOException v0) {
                                    throw GenericSsgKeyStore.b(v0);
                                }
                            }
                            var2_2.call((Object)new EmptyInputStream());
                            break block11;
                        }
                        catch (IOException v1) {
                            throw GenericSsgKeyStore.b(v1);
                        }
                    }
                    try {
                        if (!GenericSsgKeyStore.w[13].equalsIgnoreCase(var0)) break block12;
                        var2_2.call(null);
                        break block11;
                    }
                    catch (IOException v2) {
                        throw GenericSsgKeyStore.b(v2);
                    }
                }
                try {
                    if (!var1_1) break block13;
                    var2_2.call((Object)FileUtils.loadFileSafely((String)var0));
                    break block11;
                }
                catch (IOException v3) {
                    throw GenericSsgKeyStore.b(v3);
                }
            }
            var3_3 = null;
            try {
                var3_3 = new FileInputStream(var0);
                var2_2.call((Object)var3_3);
            }
            catch (Throwable var4_4) {
                ResourceUtils.closeQuietly(var3_3);
                throw var4_4;
            }
            ResourceUtils.closeQuietly((Closeable)var3_3);
        }
    }

    private static void a(KeyStore keyStore, boolean bl2, String string, char[] cArray) throws KeyStoreException {
        try {
            GenericSsgKeyStore.b(string, bl2, new b(keyStore, cArray));
        }
        catch (RuntimeException runtimeException) {
            String[] stringArray = w;
            throw new KeyStoreException(stringArray[25] + ExceptionUtils.getMessage((Throwable)runtimeException), runtimeException);
        }
        catch (IOException iOException) {
            throw new KeyStoreException(w[37] + ExceptionUtils.getMessage((Throwable)iOException), iOException);
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Unable to fully structure code
     */
    private static void b(String var0, boolean var1_1, Functions.UnaryVoid<OutputStream> var2_2) throws IOException {
        block11: {
            block13: {
                block12: {
                    block10: {
                        if (GenericSsgKeyStore.w[40].equalsIgnoreCase(var0)) ** GOTO lbl8
                        try {
                            block14: {
                                if (!GenericSsgKeyStore.w[3].equalsIgnoreCase(var0)) break block10;
                                break block14;
                                catch (IOException v0) {
                                    throw GenericSsgKeyStore.b(v0);
                                }
                            }
                            var2_2.call((Object)new NullOutputStream());
                            break block11;
                        }
                        catch (IOException v1) {
                            throw GenericSsgKeyStore.b(v1);
                        }
                    }
                    try {
                        if (!GenericSsgKeyStore.w[13].equalsIgnoreCase(var0)) break block12;
                        var2_2.call(null);
                        break block11;
                    }
                    catch (IOException v2) {
                        throw GenericSsgKeyStore.b(v2);
                    }
                }
                try {
                    if (!var1_1) break block13;
                    FileUtils.saveFileSafely((String)var0, (FileUtils.Saver)new c(var2_2));
                    break block11;
                }
                catch (IOException v3) {
                    throw GenericSsgKeyStore.b(v3);
                }
            }
            var3_3 = null;
            try {
                var3_3 = new FileOutputStream(var0);
                var2_2.call((Object)var3_3);
            }
            catch (Throwable var4_4) {
                ResourceUtils.closeQuietly(var3_3);
                throw var4_4;
            }
            ResourceUtils.closeQuietly((Closeable)var3_3);
        }
    }

    private static char[] a(String string, String string2, char[] cArray) {
        String string3 = ConfigFactory.getProperty((String)string, (String)string2);
        try {
            if (w[11].equals(string3)) {
                return null;
            }
        }
        catch (RuntimeException runtimeException) {
            throw GenericSsgKeyStore.b(runtimeException);
        }
        try {
            if (w[19].equals(string3)) {
                return cArray;
            }
        }
        catch (RuntimeException runtimeException) {
            throw GenericSsgKeyStore.b(runtimeException);
        }
        try {
            if (w[33].equals(string3)) {
                return new char[0];
            }
        }
        catch (RuntimeException runtimeException) {
            throw GenericSsgKeyStore.b(runtimeException);
        }
        return string3.toCharArray();
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    @Override
    protected KeyStore keyStore() throws KeyStoreException {
        KeyStore keyStore = this.v.get();
        if (keyStore == null) {
            AtomicReference<KeyStore> atomicReference = this.v;
            synchronized (atomicReference) {
                if (this.v.get() == null) {
                    keyStore = GenericSsgKeyStore.a(this.m, this.s, this.n, this.p);
                    this.v.set(keyStore);
                }
            }
        }
        return keyStore;
    }

    @Override
    protected String getFormat() {
        return w[31];
    }

    @Override
    protected Logger getLogger() {
        return i;
    }

    @Override
    public List<String> getAliases() throws KeyStoreException {
        List<String> list = super.getAliases();
        ArrayList<String> arrayList = new ArrayList<String>();
        KeyStore keyStore = this.keyStore();
        for (String string : list) {
            String[] stringArray;
            try {
                if (null == keyStore.getKey(string, this.getEntryPassword())) {
                    i.log(Level.FINE, w[7] + string);
                    continue;
                }
            }
            catch (KeyStoreException keyStoreException) {
                throw GenericSsgKeyStore.b(keyStoreException);
            }
            catch (NoSuchAlgorithmException noSuchAlgorithmException) {
                stringArray = w;
                i.log(Level.INFO, stringArray[36] + string + stringArray[6] + ExceptionUtils.getMessage((Throwable)noSuchAlgorithmException), ExceptionUtils.getDebugException((Throwable)noSuchAlgorithmException));
            }
            catch (UnrecoverableKeyException unrecoverableKeyException) {
                stringArray = w;
                i.log(Level.INFO, stringArray[28] + string + stringArray[34] + ExceptionUtils.getMessage((Throwable)unrecoverableKeyException), ExceptionUtils.getDebugException((Throwable)unrecoverableKeyException));
            }
            try {
                if (null == keyStore.getCertificateChain(string)) {
                    i.log(Level.FINE, w[32] + string);
                    continue;
                }
            }
            catch (NoSuchAlgorithmException noSuchAlgorithmException) {
                throw GenericSsgKeyStore.b(noSuchAlgorithmException);
            }
            catch (KeyStoreException keyStoreException) {
                stringArray = w;
                i.log(Level.WARNING, stringArray[17] + string + stringArray[34] + ExceptionUtils.getMessage((Throwable)keyStoreException), keyStoreException);
            }
            arrayList.add(string);
        }
        return arrayList;
    }

    @Override
    protected char[] getEntryPassword() {
        return this.q;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    @Override
    protected <OUT> Future<OUT> mutateKeystore(boolean bl2, Runnable runnable, Callable<OUT> callable) throws KeyStoreException {
        AtomicReference<KeyStore> atomicReference = this.v;
        synchronized (atomicReference) {
            OUT OUT;
            if (this.r) {
                throw new KeyStoreException(w[14]);
            }
            try {
                if (runnable != null) {
                    runnable.run();
                }
            }
            catch (Exception exception) {
                throw GenericSsgKeyStore.b(exception);
            }
            try {
                OUT = callable.call();
            }
            catch (Exception exception) {
                return new NotFuture(exception);
            }
            if (this.t) {
                KeyStore keyStore = this.keyStore();
                try {
                    GenericSsgKeyStore.a(keyStore, this.s, this.o, this.p);
                    if (this.u) {
                        this.v.set(null);
                        this.keyStore();
                    }
                }
                catch (Exception exception) {
                    throw GenericSsgKeyStore.b(exception);
                }
            }
            return new NotFuture(OUT);
        }
    }

    @Override
    public Goid getGoid() {
        return this.j;
    }

    @Override
    public SsgKeyFinder.SsgKeyStoreType getType() {
        return this.k;
    }

    public String getName() {
        return this.l + " " + this.m;
    }

    @Override
    public boolean isKeyExportSupported() {
        return false;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[41];
                var3_1 = 0;
                var2_2 = "GqNo_\u0002yA}KoXPtWjL3V\u001b\u007fArL WtkP{Q\u0012GZ\u007fA\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b}EmP6\\Gi\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b\u007fA\u007fG\u000e]Yt\u0005aSs\u0015j$GqNo_\u0002yA}KoXPtWjL3V\u001b~PqQ$rSyAl`)R[jA\u0006tU`\u0012\u0002\u0004\n\u001f>F3AZ\u007f\u0004#\u00038myM.A\\cC>F/GGt\u0004wMaTPcAlJ\"\u0013^h]mW.AP-SwW)\u0013[b\u0004UF8\u001f\u0015lHwB2\u0013\b-\u001dGqNo_\u0002yA}KoXPtWjL3V\u001bhJjQ8cT~W\u0018GqNo_\u0002yA}KoXPtWjL3V\u001b}EjK\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b}EmP6\\Gi\u0004jKo\r\u0018GqNo_\u0002yA}KoXPtWjL3V\u001by]nF\u0004jKo\r\u001bpvJ2\u0013^h]mW.AP-Mm\u00033VTi\tqM-J\u001b\u001dqmJ/T\u0015jApF3ZV-O{Z2GZ\u007fA>W8CP7\u0004\u0018GqNo_\u0002yA}KoXPtWjL3V\u001by]nFKmyM.A\\cC>H$J\u0015hJjQ8\u0013\\c\u0004yF/VGdG>H$JFyKlFaD\\yL>A W\u0015nAlW(U\\nEjFaP]lMp\u000faRYdEm\u0003|\u0013\"GqNo_\u0002yA}KoXPtWjL3V\u001b~EhF\u0007ZYhw\u007fE$_L\u0007`[e\u0000fyY\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b~EhF\u0011RAe\u001dGqNo_\u0002yA}KoXPtWjL3V\u001bhJjQ8cT~W\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b\u007fA\u007fG\u000e]Yt\u000b\u0004iJ5[\u0015}EjKa\u0004jQm\u0004\u001fqpB#_P-Pq\u00032RCh\u0004uF8@AbV{\u0003/RXh@$\u0003$GqNo_\u0002yA}KoXPtWjL3V\u001b\u007fArL WtkP{Q\u0012GZ\u007fA\u0006tU`\u0012\u0002\u00048myM.A\\cC>V/APnKhF3RWaA>H$J\u0015dJ>D$]P\u007fM}\u0003*VL~PqQ$\u001f\u0015lHwB2\u0013\b-\u0007`[e\u0000fyY$GqNo_\u0002yA}KoXPtWjL3V\u001b~PqQ$rSyAl`)R[jA\u0007C{M$A\\nFmyM.A\\cC>F/GGt\u0004wMaTPcAlJ\"\u0013^h]mW.AP-SwW)\u0013[b\u0004}F3G\\kM}B5V\u0015nL\u007fJ/\u001f\u0015lHwB2\u0013\b-\u0005aSs\u0015j\n\u001f>F3AZ\u007f\u0004#\u0003\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b~EhF\u0011RAeKmyM.A\\cC>H$J\u0015hJjQ8\u0013\\c\u0004yF/VGdG>H$JFyKlFaD\\yL>V/@@}TqQ5VQ-ErD.A\\yLs\u000faRYdEm\u0003|\u0013\u001fqpB#_P-Pq\u00032RCh\u0004uF8@AbV{\u0003/RXh@$\u0003\"GqNo_\u0002yA}KoXPtWjL3V\u001b~EhF\u0007ZYhw\u007fE$_L";
                var4_3 = "GqNo_\u0002yA}KoXPtWjL3V\u001b\u007fArL WtkP{Q\u0012GZ\u007fA\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b}EmP6\\Gi\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b\u007fA\u007fG\u000e]Yt\u0005aSs\u0015j$GqNo_\u0002yA}KoXPtWjL3V\u001b~PqQ$rSyAl`)R[jA\u0006tU`\u0012\u0002\u0004\n\u001f>F3AZ\u007f\u0004#\u00038myM.A\\cC>F/GGt\u0004wMaTPcAlJ\"\u0013^h]mW.AP-SwW)\u0013[b\u0004UF8\u001f\u0015lHwB2\u0013\b-\u001dGqNo_\u0002yA}KoXPtWjL3V\u001bhJjQ8cT~W\u0018GqNo_\u0002yA}KoXPtWjL3V\u001b}EjK\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b}EmP6\\Gi\u0004jKo\r\u0018GqNo_\u0002yA}KoXPtWjL3V\u001by]nF\u0004jKo\r\u001bpvJ2\u0013^h]mW.AP-Mm\u00033VTi\tqM-J\u001b\u001dqmJ/T\u0015jApF3ZV-O{Z2GZ\u007fA>W8CP7\u0004\u0018GqNo_\u0002yA}KoXPtWjL3V\u001by]nFKmyM.A\\cC>H$J\u0015hJjQ8\u0013\\c\u0004yF/VGdG>H$JFyKlFaD\\yL>A W\u0015nAlW(U\\nEjFaP]lMp\u000faRYdEm\u0003|\u0013\"GqNo_\u0002yA}KoXPtWjL3V\u001b~EhF\u0007ZYhw\u007fE$_L\u0007`[e\u0000fyY\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b~EhF\u0011RAe\u001dGqNo_\u0002yA}KoXPtWjL3V\u001bhJjQ8cT~W\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b\u007fA\u007fG\u000e]Yt\u000b\u0004iJ5[\u0015}EjKa\u0004jQm\u0004\u001fqpB#_P-Pq\u00032RCh\u0004uF8@AbV{\u0003/RXh@$\u0003$GqNo_\u0002yA}KoXPtWjL3V\u001b\u007fArL WtkP{Q\u0012GZ\u007fA\u0006tU`\u0012\u0002\u00048myM.A\\cC>V/APnKhF3RWaA>H$J\u0015dJ>D$]P\u007fM}\u0003*VL~PqQ$\u001f\u0015lHwB2\u0013\b-\u0007`[e\u0000fyY$GqNo_\u0002yA}KoXPtWjL3V\u001b~PqQ$rSyAl`)R[jA\u0007C{M$A\\nFmyM.A\\cC>F/GGt\u0004wMaTPcAlJ\"\u0013^h]mW.AP-SwW)\u0013[b\u0004}F3G\\kM}B5V\u0015nL\u007fJ/\u001f\u0015lHwB2\u0013\b-\u0005aSs\u0015j\n\u001f>F3AZ\u007f\u0004#\u0003\u001cGqNo_\u0002yA}KoXPtWjL3V\u001b~EhF\u0011RAeKmyM.A\\cC>H$J\u0015hJjQ8\u0013\\c\u0004yF/VGdG>H$JFyKlFaD\\yL>V/@@}TqQ5VQ-ErD.A\\yLs\u000faRYdEm\u0003|\u0013\u001fqpB#_P-Pq\u00032RCh\u0004uF8@AbV{\u0003/RXh@$\u0003\"GqNo_\u0002yA}KoXPtWjL3V\u001b~EhF\u0007ZYhw\u007fE$_L".length();
                var1_4 = 36;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 54;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = GenericSsgKeyStore.b(v0, GenericSsgKeyStore.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\b>\u0001 \u0010M6\u000e2\u0004 \u0017\u001f;\u0018%\u0003|\u0019T2\n%\u0004\u0004%\u001e\"K";
                    var4_3 = "\b>\u0001 \u0010M6\u000e2\u0004 \u0017\u001f;\u0018%\u0003|\u0019T2\n%\u0004\u0004%\u001e\"K".length();
                    var1_4 = 24;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 121;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = GenericSsgKeyStore.b(v0, GenericSsgKeyStore.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        GenericSsgKeyStore.w = var5;
        GenericSsgKeyStore.DEFAULT_KEYSTORE_TYPE = GenericSsgKeyStore.w[5];
        GenericSsgKeyStore.DEFAULT_KEYSTORE_PASSWORD = GenericSsgKeyStore.w[29];
        GenericSsgKeyStore.PROP_LOAD_PATH = GenericSsgKeyStore.w[39];
        GenericSsgKeyStore.DEFAULT_LOAD_PATH = GenericSsgKeyStore.w[24];
        GenericSsgKeyStore.PROP_ENTRY_PASSWORD = GenericSsgKeyStore.w[8];
        GenericSsgKeyStore.PROP_STORE_AFTER_CHANGE = GenericSsgKeyStore.w[30];
        GenericSsgKeyStore.PROP_KEYSTORE_TYPE = GenericSsgKeyStore.w[12];
        GenericSsgKeyStore.PROP_SAVE_FILE_SAFELY = GenericSsgKeyStore.w[38];
        GenericSsgKeyStore.PROP_KEYSTORE_PASSWORD = GenericSsgKeyStore.w[1];
        GenericSsgKeyStore.PROP_READ_ONLY = GenericSsgKeyStore.w[22];
        GenericSsgKeyStore.PROP_RELOAD_AFTER_STORE = GenericSsgKeyStore.w[0];
        GenericSsgKeyStore.DEFAULT_ENTRY_PASSWORD = GenericSsgKeyStore.w[29];
        GenericSsgKeyStore.PROP_STORE_PATH = GenericSsgKeyStore.w[20];
        GenericSsgKeyStore.DEFAULT_STORE_PATH = GenericSsgKeyStore.w[29];
        GenericSsgKeyStore.i = Logger.getLogger(GenericSsgKeyStore.class.getName());
    }

    private static Exception b(Exception exception) {
        return exception;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x3B);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String b(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 18;
                    case 1 -> 40;
                    case 2 -> 21;
                    case 3 -> 119;
                    case 4 -> 5;
                    case 5 -> 3;
                    default -> 59;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

