/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.security.rbac.OperationType
 *  com.l7tech.identity.User
 *  com.l7tech.objectmodel.FindException
 *  org.jetbrains.annotations.Nullable
 */
package com.l7tech.server.security.rbac;

import com.l7tech.gateway.common.security.rbac.OperationType;
import com.l7tech.identity.User;
import com.l7tech.objectmodel.FindException;
import com.l7tech.server.security.rbac.SecuredMethodInterceptor;
import com.l7tech.server.security.rbac.SecurityFilter;
import java.util.Collection;
import org.jetbrains.annotations.Nullable;

class h
implements SecurityFilter {
    final SecuredMethodInterceptor this$0;
    private static final String a = h.a(25, h.a("+x\t\u001cB\u0013\u007f.P\u0014\u0015D\u0018l"));

    h(SecuredMethodInterceptor securedMethodInterceptor) {
        this.this$0 = securedMethodInterceptor;
    }

    @Override
    public <T, C extends Collection<T>> C filter(C c10, User user, OperationType operationType, @Nullable String string) throws FindException {
        return this.this$0.a(c10, user, operationType, string, a, null);
    }

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

