aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ec_group
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2015-12-23 11:52:19 +0100
committerJack Lloyd <[email protected]>2016-01-08 19:09:51 -0500
commitd22bc10cd4f67924acd82bcd46a31e3de3b20ce3 (patch)
tree58459585e6675cd799b6ef5900be026825cd6f9d /src/lib/pubkey/ec_group
parent2fbfdd7e5afb5e888fd8c0b56c6df09e2bdeaca7 (diff)
Mass-prefix member vars with m_
Diffstat (limited to 'src/lib/pubkey/ec_group')
-rw-r--r--src/lib/pubkey/ec_group/ec_group.cpp24
-rw-r--r--src/lib/pubkey/ec_group/ec_group.h30
2 files changed, 27 insertions, 27 deletions
diff --git a/src/lib/pubkey/ec_group/ec_group.cpp b/src/lib/pubkey/ec_group/ec_group.cpp
index fc46675bd..c264d7314 100644
--- a/src/lib/pubkey/ec_group/ec_group.cpp
+++ b/src/lib/pubkey/ec_group/ec_group.cpp
@@ -23,7 +23,7 @@ EC_Group::EC_Group(const OID& domain_oid)
throw Lookup_Error("No ECC domain data for " + domain_oid.as_string());
*this = EC_Group(pem);
- oid = domain_oid.as_string();
+ m_oid = domain_oid.as_string();
}
EC_Group::EC_Group(const std::string& str)
@@ -75,13 +75,13 @@ EC_Group::EC_Group(const std::vector<byte>& ber_data)
.decode_octet_string_bigint(b)
.end_cons()
.decode(sv_base_point, OCTET_STRING)
- .decode(order)
- .decode(cofactor)
+ .decode(m_order)
+ .decode(m_cofactor)
.end_cons()
.verify_end();
- curve = CurveGFp(p, a, b);
- base_point = OS2ECP(sv_base_point, curve);
+ m_curve = CurveGFp(p, a, b);
+ m_base_point = OS2ECP(sv_base_point, m_curve);
}
else
throw Decoding_Error("Unexpected tag while decoding ECC domain params");
@@ -95,24 +95,24 @@ EC_Group::DER_encode(EC_Group_Encoding form) const
const size_t ecpVers1 = 1;
OID curve_type("1.2.840.10045.1.1");
- const size_t p_bytes = curve.get_p().bytes();
+ const size_t p_bytes = m_curve.get_p().bytes();
return DER_Encoder()
.start_cons(SEQUENCE)
.encode(ecpVers1)
.start_cons(SEQUENCE)
.encode(curve_type)
- .encode(curve.get_p())
+ .encode(m_curve.get_p())
.end_cons()
.start_cons(SEQUENCE)
- .encode(BigInt::encode_1363(curve.get_a(), p_bytes),
+ .encode(BigInt::encode_1363(m_curve.get_a(), p_bytes),
OCTET_STRING)
- .encode(BigInt::encode_1363(curve.get_b(), p_bytes),
+ .encode(BigInt::encode_1363(m_curve.get_b(), p_bytes),
OCTET_STRING)
.end_cons()
- .encode(EC2OSP(base_point, PointGFp::UNCOMPRESSED), OCTET_STRING)
- .encode(order)
- .encode(cofactor)
+ .encode(EC2OSP(m_base_point, PointGFp::UNCOMPRESSED), OCTET_STRING)
+ .encode(m_order)
+ .encode(m_cofactor)
.end_cons()
.get_contents_unlocked();
}
diff --git a/src/lib/pubkey/ec_group/ec_group.h b/src/lib/pubkey/ec_group/ec_group.h
index 67ade0c65..c7e52b238 100644
--- a/src/lib/pubkey/ec_group/ec_group.h
+++ b/src/lib/pubkey/ec_group/ec_group.h
@@ -43,11 +43,11 @@ class BOTAN_DLL EC_Group
const PointGFp& base_point,
const BigInt& order,
const BigInt& cofactor) :
- curve(curve),
- base_point(base_point),
- order(order),
- cofactor(cofactor),
- oid("")
+ m_curve(curve),
+ m_base_point(base_point),
+ m_order(order),
+ m_cofactor(cofactor),
+ m_oid("")
{}
/**
@@ -86,33 +86,33 @@ class BOTAN_DLL EC_Group
* Return domain parameter curve
* @result domain parameter curve
*/
- const CurveGFp& get_curve() const { return curve; }
+ const CurveGFp& get_curve() const { return m_curve; }
/**
* Return group base point
* @result base point
*/
- const PointGFp& get_base_point() const { return base_point; }
+ const PointGFp& get_base_point() const { return m_base_point; }
/**
* Return the order of the base point
* @result order of the base point
*/
- const BigInt& get_order() const { return order; }
+ const BigInt& get_order() const { return m_order; }
/**
* Return the cofactor
* @result the cofactor
*/
- const BigInt& get_cofactor() const { return cofactor; }
+ const BigInt& get_cofactor() const { return m_cofactor; }
- bool initialized() const { return !base_point.is_zero(); }
+ bool initialized() const { return !m_base_point.is_zero(); }
/**
* Return the OID of these domain parameters
* @result the OID
*/
- std::string get_oid() const { return oid; }
+ std::string get_oid() const { return m_oid; }
bool operator==(const EC_Group& other) const
{
@@ -128,10 +128,10 @@ class BOTAN_DLL EC_Group
static const char* PEM_for_named_group(const std::string& name);
private:
- CurveGFp curve;
- PointGFp base_point;
- BigInt order, cofactor;
- std::string oid;
+ CurveGFp m_curve;
+ PointGFp m_base_point;
+ BigInt m_order, m_cofactor;
+ std::string m_oid;
};
inline bool operator!=(const EC_Group& lhs,