All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.math.TestPrime

java.lang.Object
   |
   +----cryptix.math.TestPrime

public class TestPrime
extends Object
This class contains static methods to test the primality of a cryptix.math.BigInteger.

New code should probably use java.math.BigInteger, which has an isProbablePrime method (and also a constructor for generating random probable-primes).

Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.1.1.1 $

Author:
unattributed
See Also:
BigInteger, isProbablePrime

Constructor Index

 o TestPrime()

Method Index

 o hasSmallFactor(BigInteger)
 o hasSmallFactor(BigInteger, TestPrimeObserver)
 o isPrime(BigInteger)
 o isPrime(BigInteger, TestPrimeObserver)
 o main(String[])
 o self_test(PrintWriter)

Constructors

 o TestPrime
 public TestPrime()

Methods

 o hasSmallFactor
 public static boolean hasSmallFactor(BigInteger n)
 o hasSmallFactor
 public static boolean hasSmallFactor(BigInteger n,
                                      TestPrimeObserver obsrv)
 o isPrime
 public static boolean isPrime(BigInteger p)
 o isPrime
 public static boolean isPrime(BigInteger p,
                               TestPrimeObserver obsrv)
 o main
 public static void main(String args[])
 o self_test
 public static void self_test(PrintWriter out) throws Exception

All Packages  Class Hierarchy  This Package  Previous  Next  Index