davedelong edited this page Sep 13, 2010 · 4 revisions
Clone this wiki locally

Welcome to the CHMath wiki!

CHMath is an Objective-C wrapper around OpenSSL’s BigNumber math functions. It provides three classes for you to use:

  • CHNumber
  • CHMutableNumber
  • CHUtils


CHNumber is the base class of all big integer functionality. It encapsulates an immutable Big Integer, but still provides an interface for manipulating this integer with other CHNumbers.


CHMutableNumber is similar to CHNumber (its superclass), except that CHMutableNumbers also allow you to manipulate the encapsulated Big Integer directly..


CHUtils provides class (static) methods for common functionality, such as generating cryptographically strong prime numbers, finding the greatest common divisor of two CHNumbers, etc.