/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.identity.User
 *  com.l7tech.security.token.SecurityToken
 *  com.l7tech.security.token.SecurityTokenType
 *  com.l7tech.security.token.SessionSecurityToken
 *  com.l7tech.security.xml.decorator.DecorationRequirements$SecureConversationSession
 *  com.l7tech.security.xml.processor.SecurityContext
 */
package com.l7tech.server.secureconversation;

import com.l7tech.identity.User;
import com.l7tech.security.token.SecurityToken;
import com.l7tech.security.token.SecurityTokenType;
import com.l7tech.security.token.SessionSecurityToken;
import com.l7tech.security.xml.decorator.DecorationRequirements;
import com.l7tech.security.xml.processor.SecurityContext;
import org.w3c.dom.Element;

public class SecureConversationSession
implements SecurityContext,
DecorationRequirements.SecureConversationSession {
    private final String a;
    private final byte[] b;
    private final byte[] c;
    private final byte[] d;
    private final long e;
    private final long f;
    private final User g;
    private final String h;
    private final Element i;
    private final SessionSecurityToken j;

    public SecureConversationSession(String string, String string2, byte[] byArray, long l2, long l3, User user) {
        this(string, string2, null, null, byArray, l2, l3, user, null);
    }

    public SecureConversationSession(String string, String string2, byte[] byArray, byte[] byArray2, byte[] byArray3, long l2, long l3, User user, Element element) {
        this.h = string;
        this.a = string2;
        this.c = byArray;
        this.d = byArray2;
        this.b = byArray3;
        this.f = l2;
        this.e = l3;
        this.g = user;
        this.i = element;
        this.j = new SessionSecurityToken(SecurityTokenType.WSSC_CONTEXT, user.getProviderId(), user.getId(), user.getLogin());
    }

    public String getIdentifier() {
        return this.a;
    }

    public byte[] getSharedSecret() {
        return this.b;
    }

    public boolean hasEntropy() {
        return this.c != null && this.d != null;
    }

    public byte[] getClientEntropy() {
        return this.c;
    }

    public byte[] getServerEntropy() {
        return this.d;
    }

    public int getKeySize() {
        return this.b.length * 8;
    }

    public SecurityToken getSecurityToken() {
        return null;
    }

    public long getExpiration() {
        return this.e;
    }

    public long getCreation() {
        return this.f;
    }

    public User getUsedBy() {
        return this.g;
    }

    public String getSecConvNamespaceUsed() {
        return this.h;
    }

    public String getId() {
        return this.getIdentifier();
    }

    public byte[] getSecretKey() {
        return this.getSharedSecret();
    }

    public String getSCNamespace() {
        return this.getSecConvNamespaceUsed();
    }

    public Element getElement() {
        return this.i;
    }

    public SessionSecurityToken getCredentialSecurityToken() {
        return this.j;
    }
}

