All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.factcenter.fastgc.OT.Sender Maven / Gradle / Ivy

The newest version!
// Copyright (C) 2010 by Yan Huang 

package org.factcenter.fastgc.OT;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.math.BigInteger;

public abstract class Sender {
	protected int numOfPairs;
	protected int msgBitLength;
	protected BigInteger[][] msgPairs;

	protected ObjectInputStream ois;
	protected ObjectOutputStream oos;

	public Sender(int numOfPairs, int msgBitLength, ObjectInputStream in,
			ObjectOutputStream out) {
		this.numOfPairs = numOfPairs;
		this.msgBitLength = msgBitLength;
		ois = in;
		oos = out;
	}

	public void execProtocol(BigInteger[][] msgPairs) throws IOException {
		if (msgPairs.length != numOfPairs)
			throw new IOException("Message pair length error: " + msgPairs.length
					+ " != " + numOfPairs);

		this.msgPairs = msgPairs;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy