SignatureFactory factory = new H2HSignatureFactory();
// replace default signature factories
ChannelClientConfiguration clientConfig = PeerMaker.createDefaultChannelClientConfiguration();
clientConfig.signatureFactory(factory);
ChannelServerConficuration serverConfig = PeerMaker.createDefaultChannelServerConfiguration();
serverConfig.signatureFactory(factory);
KeyPair keyPairPeer1 = gen.generateKeyPair();
Peer p1 = new PeerMaker(Number160.createHash(1)).ports(4834).keyPair(keyPairPeer1)
.setEnableIndirectReplication(true).channelClientConfiguration(clientConfig)
.channelServerConfiguration(serverConfig).makeAndListen();