/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.DeleteException
 *  com.l7tech.objectmodel.EntityType
 *  com.l7tech.util.GoidUpgradeMapper
 */
package com.l7tech.server.bundling;

import com.l7tech.objectmodel.DeleteException;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.server.bundling.n;
import com.l7tech.server.security.keystore.SsgKeyStore;
import com.l7tech.util.GoidUpgradeMapper;
import java.security.KeyStoreException;
import java.util.concurrent.Callable;

class o
implements Callable<String> {
    final String val$keyStoreId;
    final String val$keyAlias;
    final n this$1;
    private static final String a = o.a(52, o.a("l\u0005_\\>/q]\u0003H^<{yG\u0010\rG#/tL\u001bHG)/q\t\u0007_Z:ndLWFV550\t"));

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    o(n n2, String string, String string2) {
        this.this$1 = n2;
        this.val$keyStoreId = string;
        this.val$keyAlias = string2;
    }

    @Override
    public String call() throws Exception {
        try {
            SsgKeyStore ssgKeyStore = this.this$1.this$0.a(GoidUpgradeMapper.mapId((EntityType)EntityType.SSG_KEYSTORE, (String)this.val$keyStoreId));
            ssgKeyStore.getKeyStore().deletePrivateKeyEntry(true, null, this.val$keyAlias);
            return null;
        }
        catch (KeyStoreException keyStoreException) {
            throw new DeleteException(a + this.val$keyStoreId + ":" + this.val$keyAlias, (Throwable)keyStoreException);
        }
    }

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

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String a(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 -> 29;
                    case 1 -> 67;
                    case 2 -> 25;
                    case 3 -> 7;
                    case 4 -> 120;
                    case 5 -> 59;
                    default -> 36;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

