Java BigInteger Value Check isGoodGaAndGb(BigInteger g_a, BigInteger p)

Here you can find the source of isGoodGaAndGb(BigInteger g_a, BigInteger p)

Description

is Good Ga And Gb

License

GNU General Public License

Declaration

public static boolean isGoodGaAndGb(BigInteger g_a, BigInteger p) 

Method Source Code

//package com.java2s;
/*/*from  w w w. j  a v a2  s  . co m*/
 * This is the source code of Telegram for Android v. 2.x.x.
 * It is licensed under GNU GPL v. 2 or later.
 * You should have received a copy of the license in this archive (see LICENSE).
 *
 * Copyright Nikolai Kudashov, 2013-2015.
 */

import java.math.BigInteger;

public class Main {
    public static boolean isGoodGaAndGb(BigInteger g_a, BigInteger p) {
        return !(g_a.compareTo(BigInteger.valueOf(1)) != 1
                || g_a.compareTo(p.subtract(BigInteger.valueOf(1))) != -1);
    }
}

Related

  1. isCovers(BigInteger covers, BigInteger value)
  2. isDefined(BigInteger no)
  3. isElementOfZn(BigInteger element, BigInteger n)
  4. isEven(BigInteger x)
  5. isFermatNumber(BigInteger f)
  6. isIn20PercentRange(BigInteger first, BigInteger second)
  7. isInRange(BigInteger in, int range, double eps)
  8. isInt(final BigInteger i)
  9. isIntValue(BigInteger bi)