aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-05 11:50:03 +0000
committerlloyd <[email protected]>2008-09-05 11:50:03 +0000
commitb326b73113ce368c96116354259e23395af149f0 (patch)
treee046a9f553c5740168132590ba55ae532f84094b /include
parent849ae9d1c1f7474456d9e174470463656f801160 (diff)
Add new aliases to the DL_Group::Format enum. The previous values were
pretty opaque; now use the easier to remember DL_Group::DSA_PARAMETERS and DL_Group::DH_PARAMETERS
Diffstat (limited to 'include')
-rw-r--r--include/dl_group.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/dl_group.h b/include/dl_group.h
index 74a11b5d5..37871f38d 100644
--- a/include/dl_group.h
+++ b/include/dl_group.h
@@ -21,7 +21,17 @@ class BOTAN_DLL DL_Group
const BigInt& get_q() const;
const BigInt& get_g() const;
- enum Format { ANSI_X9_42, ANSI_X9_57, PKCS_3 };
+ enum Format {
+ ANSI_X9_42,
+ ANSI_X9_57,
+ PKCS_3,
+
+ DSA_PARAMETERS = ANSI_X9_57,
+ DH_PARAMETERS = ANSI_X9_42,
+ X942_DH_PARAMETERS = ANSI_X9_42,
+ PKCS3_DH_PARAMETERS = PKCS_3
+ };
+
enum PrimeType { Strong, Prime_Subgroup, DSA_Kosherizer };
bool verify_group(RandomNumberGenerator& rng, bool) const;
@@ -38,8 +48,8 @@ class BOTAN_DLL DL_Group
DL_Group(RandomNumberGenerator& rng, const MemoryRegion<byte>&,
u32bit = 1024, u32bit = 0);
- DL_Group(const BigInt&, const BigInt&);
- DL_Group(const BigInt&, const BigInt&, const BigInt&);
+ DL_Group(const BigInt& p, const BigInt& g);
+ DL_Group(const BigInt& p, const BigInt& g, const BigInt& q);
private:
static BigInt make_dsa_generator(const BigInt&, const BigInt&);