package aalg.crypto;

import java.util.HashMap;
import java.util.Map;

public class InternalPublicKeyRegister<PUB extends IPublicKey> implements IPublicKeyRegister<PUB> {

	private final Map<Long, PUB> keyMap = new HashMap<>();
	
	public void registerPublicKey (final long entityId, final PUB key) {
		keyMap.put(entityId, key);
	}
	
	@Override
	public PUB getPublicKey(final long entityId) {
		return keyMap.get(entityId);
	}

}
