aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Cryptography/BigNumber.h
diff options
context:
space:
mode:
authorVincent_Michael <Vincent_Michael@gmx.de>2013-01-01 23:12:21 +0100
committerVincent_Michael <Vincent_Michael@gmx.de>2013-01-01 23:12:21 +0100
commit62adbdab992ec177f60dec76447508741de4e7db (patch)
treef71d5970526fe06b04f6ba7953bec70f665aaf5e /src/server/shared/Cryptography/BigNumber.h
parent234f0971200a0d75db61b163afc433270bce632b (diff)
parent01b705c84422902201a9ae51b1fb457f9f53d601 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Conflicts: src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
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;