- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# RWFunction Class Reference

`#include <rw.h>`

Inheritance diagram for RWFunction:

List of all members.

## Detailed Description

_

Definition at line 14 of file rw.h.

## Public Member Functions
void | Initialize (const Integer &n)
void | BERDecode (BufferedTransformation &bt)
void | DEREncode (BufferedTransformation &bt) const
Integer | ApplyFunction (const Integer &x) const
Integer | PreimageBound () const
Integer | ImageBound () const
bool | Validate (RandomNumberGenerator &rng, unsigned int level) const
| check this object for errors
bool | GetVoidValue (const char *name, const std::type_info &valueType, void *pValue) const
| to be implemented by derived classes, users should use one of the above functions instead
void | AssignFrom (const NameValuePairs &source)
| assign values from source to this object
const Integer & | GetModulus () const
void | SetModulus (const Integer &n)
Integer | ApplyRandomizedFunction (RandomNumberGenerator &rng, const Integer &x) const
bool | IsRandomized () const
virtual Integer | MaxPreimage () const
virtual Integer | MaxImage () const
## Protected Attributes
Integer | m_n

## Member Function Documentation

bool RWFunction::Validate | ( | RandomNumberGenerator & | rng,
|  | unsigned int | level |
| ) |  |  | const`[virtual]`

check this object for errors

Parameters:

  | level | denotes the level of thoroughness: 0 - using this object won't cause a crash or exception (rng is ignored) 1 - this object will probably function (encrypt, sign, etc.) correctly (but may not check for weak keys and such) 2 - make sure this object will function correctly, and do reasonable security checks 3 - do checks that may take a long time

Returns:
  true if the tests pass

Implements CryptoMaterial.

Reimplemented in InvertibleRWFunction.

Definition at line 63 of file rw.cpp.

References m_n, and Integer::One().

Referenced by InvertibleRWFunction::Validate().

void RWFunction::AssignFrom | ( | const NameValuePairs & | source | ) | `[virtual]`

assign values from source to this object

Note:
  This function can be used to create a public key from a private key.

Implements CryptoMaterial.

Reimplemented in InvertibleRWFunction.

Definition at line 77 of file rw.cpp.

The documentation for this class was generated from the following files:

- rw.h
- rw.cpp