mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 01:49:41 +00:00
Update docs
Thanks to Bing Shi
This commit is contained in:
parent
3e3b8af96d
commit
eb383b8e16
8
gf2n.cpp
8
gf2n.cpp
@ -135,6 +135,9 @@ PolynomialMod2 PolynomialMod2::Monomial(size_t i)
|
||||
|
||||
PolynomialMod2 PolynomialMod2::Trinomial(size_t t0, size_t t1, size_t t2)
|
||||
{
|
||||
CRYPTOPP_ASSERT(t0 > t1);
|
||||
CRYPTOPP_ASSERT(t1 > t2);
|
||||
|
||||
PolynomialMod2 r((word)0, t0+1);
|
||||
r.SetBit(t0);
|
||||
r.SetBit(t1);
|
||||
@ -144,6 +147,11 @@ PolynomialMod2 PolynomialMod2::Trinomial(size_t t0, size_t t1, size_t t2)
|
||||
|
||||
PolynomialMod2 PolynomialMod2::Pentanomial(size_t t0, size_t t1, size_t t2, size_t t3, size_t t4)
|
||||
{
|
||||
CRYPTOPP_ASSERT(t0 > t1);
|
||||
CRYPTOPP_ASSERT(t1 > t2);
|
||||
CRYPTOPP_ASSERT(t2 > t3);
|
||||
CRYPTOPP_ASSERT(t3 > t4);
|
||||
|
||||
PolynomialMod2 r((word)0, t0+1);
|
||||
r.SetBit(t0);
|
||||
r.SetBit(t1);
|
||||
|
2
gf2n.h
2
gf2n.h
@ -69,9 +69,11 @@ public:
|
||||
static PolynomialMod2 CRYPTOPP_API Monomial(size_t i);
|
||||
/// \brief Provides x^t0 + x^t1 + x^t2
|
||||
/// \return x^t0 + x^t1 + x^t2
|
||||
/// \pre The coefficients should be provided in descending order. That is, <pre>t0 > t1 > t2<pre>.
|
||||
static PolynomialMod2 CRYPTOPP_API Trinomial(size_t t0, size_t t1, size_t t2);
|
||||
/// \brief Provides x^t0 + x^t1 + x^t2 + x^t3 + x^t4
|
||||
/// \return x^t0 + x^t1 + x^t2 + x^t3 + x^t4
|
||||
/// \pre The coefficients should be provided in descending order. That is, <pre>t0 > t1 > t2 > t3 > t4<pre>.
|
||||
static PolynomialMod2 CRYPTOPP_API Pentanomial(size_t t0, size_t t1, size_t t2, size_t t3, size_t t4);
|
||||
/// \brief Provides x^(n-1) + ... + x + 1
|
||||
/// \return x^(n-1) + ... + x + 1
|
||||
|
Loading…
Reference in New Issue
Block a user