aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Auth/BigNumber.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-09-02 16:22:32 -0500
committermegamage <none@none>2009-09-02 16:22:32 -0500
commit790c5348a33ad28422e9356e598bf7084b0159b6 (patch)
tree78b79b129c84c9f184f00ce9c152965bc43a65a8 /src/shared/Auth/BigNumber.cpp
parent0c0a7b6b0ee55aa1c58a82b2afdc48614f3342bc (diff)
[8445] Fixed redundant calculation of v and s on every login Author: arrai
The SRP-6 specifications clearly say, that v and s are only to be calculated on registering a user and changing his password; calculating them on every login is plain waste. --HG-- branch : trunk
Diffstat (limited to 'src/shared/Auth/BigNumber.cpp')
-rw-r--r--src/shared/Auth/BigNumber.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/Auth/BigNumber.cpp b/src/shared/Auth/BigNumber.cpp
index 7872b141f3d..8869d3bb9e5 100644
--- a/src/shared/Auth/BigNumber.cpp
+++ b/src/shared/Auth/BigNumber.cpp
@@ -161,6 +161,11 @@ uint32 BigNumber::AsDword()
return (uint32)BN_get_word(_bn);
}
+bool BigNumber::isZero() const
+{
+ return BN_is_zero(_bn)!=0;
+}
+
uint8 *BigNumber::AsByteArray(int minSize)
{
int length = (minSize >= GetNumBytes()) ? minSize : GetNumBytes();