summaryrefslogtreecommitdiffstats
path: root/src/Crypto.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-28 09:50:48 +0100
committermadmaxoft <github@xoft.cz>2014-01-28 09:50:48 +0100
commit81837edb22197b48c3da4c47954681096a867766 (patch)
treef7ada66e22e1d6cf3a6ae11c6e707ecbc09e8fac /src/Crypto.cpp
parentMerge pull request #595 from mc-server/NonBlockingSockets (diff)
downloadcuberite-81837edb22197b48c3da4c47954681096a867766.tar
cuberite-81837edb22197b48c3da4c47954681096a867766.tar.gz
cuberite-81837edb22197b48c3da4c47954681096a867766.tar.bz2
cuberite-81837edb22197b48c3da4c47954681096a867766.tar.lz
cuberite-81837edb22197b48c3da4c47954681096a867766.tar.xz
cuberite-81837edb22197b48c3da4c47954681096a867766.tar.zst
cuberite-81837edb22197b48c3da4c47954681096a867766.zip
Diffstat (limited to 'src/Crypto.cpp')
-rw-r--r--src/Crypto.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Crypto.cpp b/src/Crypto.cpp
index 2045d0385..540b5cfde 100644
--- a/src/Crypto.cpp
+++ b/src/Crypto.cpp
@@ -214,7 +214,6 @@ int cRSAPrivateKey::Encrypt(const Byte * a_PlainData, size_t a_PlainLength, Byte
ASSERT(!"Invalid a_PlainLength!");
return -1;
}
- size_t DecryptedLength;
int res = rsa_pkcs1_encrypt(
&m_Rsa, ctr_drbg_random, &m_Ctr_drbg, RSA_PUBLIC,
a_PlainLength, a_PlainData, a_EncryptedData
@@ -223,7 +222,7 @@ int cRSAPrivateKey::Encrypt(const Byte * a_PlainData, size_t a_PlainLength, Byte
{
return -1;
}
- return (int)DecryptedLength;
+ return (int)m_Rsa.len;
}