// 
// Decompiled by Procyon v0.6.0
// 

package org.bouncycastle.crypto.hpke;

import org.bouncycastle.crypto.InvalidCipherTextException;

public class HPKEContext
{
    protected final AEAD aead;
    protected final HKDF hkdf;
    protected final byte[] exporterSecret;
    protected final byte[] suiteId;
    
    HPKEContext(final AEAD aead, final HKDF hkdf, final byte[] exporterSecret, final byte[] suiteId) {
        this.aead = aead;
        this.hkdf = hkdf;
        this.exporterSecret = exporterSecret;
        this.suiteId = suiteId;
    }
    
    public byte[] export(final byte[] array, final int n) {
        return this.hkdf.LabeledExpand(this.exporterSecret, this.suiteId, "sec", array, n);
    }
    
    public byte[] seal(final byte[] array, final byte[] array2) throws InvalidCipherTextException {
        return this.aead.seal(array, array2);
    }
    
    public byte[] seal(final byte[] array, final byte[] array2, final int n, final int n2) throws InvalidCipherTextException {
        return this.aead.seal(array, array2, n, n2);
    }
    
    public byte[] open(final byte[] array, final byte[] array2) throws InvalidCipherTextException {
        return this.aead.open(array, array2);
    }
    
    public byte[] open(final byte[] array, final byte[] array2, final int n, final int n2) throws InvalidCipherTextException {
        return this.aead.open(array, array2, n, n2);
    }
    
    public byte[] extract(final byte[] array, final byte[] array2) {
        return this.hkdf.Extract(array, array2);
    }
    
    public byte[] expand(final byte[] array, final byte[] array2, final int n) {
        return this.hkdf.Expand(array, array2, n);
    }
}
