Package org.apache.sshd.common

Examples of org.apache.sshd.common.Random.random()


        if (selected.isEmpty()) {
            log.warn("No suitable primes found, defaulting to DHG1");
            return getDH(new BigInteger(DHGroupData.getG()), new BigInteger(DHGroupData.getP1()));
        }
        Random random = session.getFactoryManager().getRandomFactory().create();
        int which = random.random(selected.size());
        Moduli.DhGroup group = selected.get(which);
        return getDH(group.p, group.g);
    }

    protected DH getDH(BigInteger p, BigInteger g) throws Exception {
View Full Code Here


        }
        if (selected.isEmpty()) {
            throw new IllegalArgumentException("No suitable primes");
        }
        Random random = session.getFactoryManager().getRandomFactory().create();
        int which = random.random(selected.size());
        Moduli.DhGroup group = selected.get(which);
        return getDH(group.p, group.g);
    }

    protected DH getDH(BigInteger p, BigInteger g) throws Exception {
View Full Code Here

        }
        if (selected.isEmpty()) {
            throw new IllegalArgumentException("No suitable primes");
        }
        Random random = session.getFactoryManager().getRandomFactory().create();
        int which = random.random(selected.size());
        Moduli.DhGroup group = selected.get(which);
        return getDH(group.p, group.g);
    }

    protected DH getDH(BigInteger p, BigInteger g) throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.