![]() |
Anoncoin
0.9.4
P2P Digital Currency
|
Implementation of the RSA-based accumulator. More...
#include <Accumulator.h>
Public Member Functions | |
template<typename Stream > | |
Accumulator (const AccumulatorAndProofParams *p, Stream &strm) | |
Construct an Accumulator from a stream. More... | |
template<typename Stream > | |
Accumulator (const Params *p, Stream &strm) | |
Accumulator (const AccumulatorAndProofParams *p, const CoinDenomination d) | |
Construct an Accumulator from a Params object. More... | |
Accumulator (const Params *p, const CoinDenomination d) | |
void | accumulate (const PublicCoin &coin) |
Accumulate a coin into the accumulator. More... | |
CoinDenomination | getDenomination () const |
Bignum | getValue () const |
Get the accumulator result. More... | |
Accumulator & | operator+= (const PublicCoin &c) |
Used to set the accumulator value. More... | |
bool | operator== (const Accumulator rhs) const |
Public Attributes | |
IMPLEMENT_SERIALIZE(READWRITE(value);READWRITE(denomination);) private Bignum | value |
CoinDenomination | denomination |
Implementation of the RSA-based accumulator.
Definition at line 20 of file Accumulator.h.
|
inline |
Construct an Accumulator from a stream.
p | An AccumulatorAndProofParams object containing global parameters |
d | the denomination of coins we are accumulating |
Zerocoin | exception in case of invalid parameters |
Definition at line 30 of file Accumulator.h.
|
inline |
Definition at line 35 of file Accumulator.h.
libzerocoin::Accumulator::Accumulator | ( | const AccumulatorAndProofParams * | p, |
const CoinDenomination | d | ||
) |
Construct an Accumulator from a Params object.
p | A Params object containing global parameters |
d | the denomination of coins we are accumulating |
Zerocoin | exception in case of invalid parameters |
Definition at line 20 of file Accumulator.cpp.
libzerocoin::Accumulator::Accumulator | ( | const Params * | p, |
const CoinDenomination | d | ||
) |
Definition at line 28 of file Accumulator.cpp.
void libzerocoin::Accumulator::accumulate | ( | const PublicCoin & | coin | ) |
Accumulate a coin into the accumulator.
Validates the coin prior to accumulation.
coin | A PublicCoin to accumulate. |
Zerocoin | exception if the coin is not valid. |
Definition at line 39 of file Accumulator.cpp.
CoinDenomination libzerocoin::Accumulator::getDenomination | ( | ) | const |
Bignum libzerocoin::Accumulator::getValue | ( | ) | const |
Get the accumulator result.
Definition at line 75 of file Accumulator.cpp.
Accumulator & libzerocoin::Accumulator::operator+= | ( | const PublicCoin & | c | ) |
Used to set the accumulator value.
Use this to handle accumulator checkpoints
b | the value to set the accumulator to. |
A | ZerocoinException if the accumulator value is invalid. Used to accumulate a coin |
c | the coin to accumulate |
Definition at line 79 of file Accumulator.cpp.
bool libzerocoin::Accumulator::operator== | ( | const Accumulator | rhs | ) | const |
Definition at line 84 of file Accumulator.cpp.
CoinDenomination libzerocoin::Accumulator::denomination |
Definition at line 94 of file Accumulator.h.
IMPLEMENT_SERIALIZE ( READWRITE(value); READWRITE(denomination); ) private Bignum libzerocoin::Accumulator::value |
Definition at line 87 of file Accumulator.h.