aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Cryptography/BigNumber.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/shared/Cryptography/BigNumber.h')
-rw-r--r--src/server/shared/Cryptography/BigNumber.h44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/server/shared/Cryptography/BigNumber.h b/src/server/shared/Cryptography/BigNumber.h
index 36a618056a5..fe56fd7e6f9 100644
--- a/src/server/shared/Cryptography/BigNumber.h
+++ b/src/server/shared/Cryptography/BigNumber.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -28,45 +28,49 @@ class BigNumber
{
public:
BigNumber();
- BigNumber(const BigNumber &bn);
+ BigNumber(BigNumber const& bn);
BigNumber(uint32);
~BigNumber();
void SetDword(uint32);
void SetQword(uint64);
- void SetBinary(const uint8 *bytes, int len);
- void SetHexStr(const char *str);
+ void SetBinary(uint8 const* bytes, int32 len);
+ void SetHexStr(char const* str);
- void SetRand(int numbits);
+ void SetRand(int32 numbits);
- BigNumber& operator=(const BigNumber &bn);
+ BigNumber& operator=(BigNumber const& bn);
- BigNumber operator+=(const BigNumber &bn);
- BigNumber operator+(const BigNumber &bn)
+ BigNumber operator+=(BigNumber const& bn);
+ BigNumber operator+(BigNumber const& bn)
{
BigNumber t(*this);
return t += bn;
}
- BigNumber operator-=(const BigNumber &bn);
- BigNumber operator-(const BigNumber &bn)
+
+ BigNumber operator-=(BigNumber const& bn);
+ BigNumber operator-(BigNumber const& bn)
{
BigNumber t(*this);
return t -= bn;
}
- BigNumber operator*=(const BigNumber &bn);
- BigNumber operator*(const BigNumber &bn)
+
+ BigNumber operator*=(BigNumber const& bn);
+ BigNumber operator*(BigNumber const& bn)
{
BigNumber t(*this);
return t *= bn;
}
- BigNumber operator/=(const BigNumber &bn);
- BigNumber operator/(const BigNumber &bn)
+
+ BigNumber operator/=(BigNumber const& bn);
+ BigNumber operator/(BigNumber const& bn)
{
BigNumber t(*this);
return t /= bn;
}
- BigNumber operator%=(const BigNumber &bn);
- BigNumber operator%(const BigNumber &bn)
+
+ BigNumber operator%=(BigNumber const& bn);
+ BigNumber operator%(BigNumber const& bn)
{
BigNumber t(*this);
return t %= bn;
@@ -74,15 +78,15 @@ class BigNumber
bool isZero() const;
- BigNumber ModExp(const BigNumber &bn1, const BigNumber &bn2);
- BigNumber Exp(const BigNumber &);
+ BigNumber ModExp(BigNumber const& bn1, BigNumber const& bn2);
+ BigNumber Exp(BigNumber const&);
- int GetNumBytes(void);
+ int32 GetNumBytes(void);
struct bignum_st *BN() { return _bn; }
uint32 AsDword();
- uint8* AsByteArray(int minSize = 0, bool reverse = true);
+ uint8* AsByteArray(int32 minSize = 0, bool reverse = true);
char * AsHexStr() const;
char * AsDecStr() const;