Change to RSA decrypt function

This commit is contained in:
Henrique 2012-08-01 15:34:42 -03:00
parent 3bac3dcbb4
commit 4f0e00fdfa
2 changed files with 3 additions and 2 deletions

View File

@ -86,10 +86,11 @@ std::string InputMessage::getString()
return std::string(v, stringLength);
}
void InputMessage::decryptRsa(int size, const std::string& p, const std::string& q, const std::string& d)
bool InputMessage::decryptRsa(int size, const std::string& p, const std::string& q, const std::string& d)
{
checkRead(size);
RSA::decrypt((char*)m_buffer + m_readPos, size, p.c_str(), q.c_str(), d.c_str());
return (getU8() == 0x00);
}
void InputMessage::fillBuffer(uint8 *buffer, uint16 size)

View File

@ -52,7 +52,7 @@ public:
uint32 peekU32() { uint32 v = getU32(); m_readPos-=4; return v; }
uint64 peekU64() { uint64 v = getU64(); m_readPos-=8; return v; }
void decryptRsa(int size, const std::string& p, const std::string& q, const std::string& d);
bool decryptRsa(int size, const std::string& p, const std::string& q, const std::string& d);
int getReadSize() { return m_readPos - m_headerPos; }
int getReadPos() { return m_readPos; }