diff options
author | Jack Lloyd <[email protected]> | 2021-04-24 09:15:42 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2021-04-24 09:54:14 -0400 |
commit | 5dc8c0e4984161fb61bb2f6172dd9c1c61ffcfb5 (patch) | |
tree | c5b7a1915828745641039863544885d244fd9cb2 /src/lib/pubkey/elgamal/elgamal.h | |
parent | 5251aa6694f65ccf92f0ddf169a3e37f219947ad (diff) |
Modify BigInt constructors
Add static methods for very common (eg zero, one) or very uncommon (eg
ECSDA truncated integers) construction methods, instead of using C++
constructors for all of these.
Also adds from_s32 which allows creating a negative BigInt easily,
instead of -BigInt(-x) -> BigInt::from_s32(x)
Diffstat (limited to 'src/lib/pubkey/elgamal/elgamal.h')
-rw-r--r-- | src/lib/pubkey/elgamal/elgamal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/elgamal/elgamal.h b/src/lib/pubkey/elgamal/elgamal.h index 0c440df00..a316d9c50 100644 --- a/src/lib/pubkey/elgamal/elgamal.h +++ b/src/lib/pubkey/elgamal/elgamal.h @@ -72,7 +72,7 @@ class BOTAN_PUBLIC_API(2,0) ElGamal_PrivateKey final : public ElGamal_PublicKey, */ ElGamal_PrivateKey(RandomNumberGenerator& rng, const DL_Group& group, - const BigInt& priv_key = 0); + const BigInt& priv_key = BigInt::zero()); std::unique_ptr<Public_Key> public_key() const override; |