/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.DeleteException
 */
package com.l7tech.server.security.keystore;

import com.l7tech.objectmodel.DeleteException;
import com.l7tech.server.security.keystore.JdkKeyStoreBackedSsgKeyStore;
import java.security.KeyStoreException;
import java.util.concurrent.Callable;

class b
implements Callable<Boolean> {
    final String val$keyAlias;
    final JdkKeyStoreBackedSsgKeyStore this$0;
    private static final String a = b.a(120, b.a("wrY\u0010S\u001c+Vs\u0018\u0016Z\u0015nVy\u0018\u001fZ\rjF}L\u0013\u001f\u001fdP<S\u0017FY"));

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    b(JdkKeyStoreBackedSsgKeyStore jdkKeyStoreBackedSsgKeyStore, String string) {
        this.this$0 = jdkKeyStoreBackedSsgKeyStore;
        this.val$keyAlias = string;
    }

    @Override
    public Boolean call() throws KeyStoreException {
        this.this$0.keyStore().deleteEntry(this.val$keyAlias);
        try {
            this.this$0.h.deleteMetadataForKey(this.this$0.getGoid(), this.val$keyAlias);
        }
        catch (DeleteException deleteException) {
            throw new KeyStoreException(a + this.val$keyAlias, deleteException);
        }
        return Boolean.TRUE;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x73);
        }
        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 -> 90;
                    case 1 -> 100;
                    case 2 -> 64;
                    case 3 -> 10;
                    case 4 -> 71;
                    case 5 -> 1;
                    default -> 115;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

