Cryptography Reference
In-Depth Information
class LINT
{
public:
LINT (void); // constructor
˜ LINT (); // destructor
const LINT& operator= (const LINT&);
const LINT& operator+= (const LINT&);
const LINT& operator-= (const LINT&);
const LINT& operator*= (const LINT&);
const LINT& operator/= (const LINT&);
const LINT& operator
LINT gcd (const LINT&);
LINT lcm (const LINT&);
int jacobi (const LINT&);
friend const LINT operator + (const LINT&, const LINT&);
friend const LINT operator - (const LINT&, const LINT&);
friend const LINT operator * (const LINT&, const LINT&);
friend const LINT operator / (const LINT&, const LINT&);
friend const LINT operator
friend LINT mexp (const LINT&, const LINT&, const LINT&);
friend LINT mexp (const USHORT, const LINT&, const LINT&);
friend LINT mexp (const LINT&, USHORT, const LINT&);
friend LINT gcd (const LINT&, const LINT&);
friend LINT lcm (const LINT&, const LINT&);
friend int jacobi (const LINT&, const LINT&);
private:
clint *n_l;
int status;
};
One may recognize the typical subdivision into two blocks: First the public
block is declared with a constructor, a destructor, arithmetic operators, and
member functions as well as the friend functions of the class. A short block of
private data elements is joined to the public interface, identified by the label
private . It is an aid to clarity and is considered good style to place the public
interface before the private block and to use the labels “public” and “private” only
once each within a class declaration.
The list of operators appearing in the section of the class declaration shown
here is by no means complete. It is missing some arithmetic functions that cannot
be represented as operators as well as most of the number-theoretic functions,
which we know already as C functions. Furthermore, the announced constructors
are as little represented as the functions for input and output of LINT objects.
In the following parameter lists of the operators and functions the address
operator & appears, which has the effect that objects of the class LINT are passed
Search WWH ::




Custom Search