2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Fixed offset calculation.
	* src/LibgcryptDHKeyExchange.h (computeSecret)
pull/1/head
Tatsuhiro Tsujikawa 2008-02-24 13:56:03 +00:00
parent 5a4d691aed
commit 1d32c516d9
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed offset calculation.
* src/LibgcryptDHKeyExchange.h (computeSecret)
2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten itos and uitos using template. llitos and ullitos are

View File

@ -151,7 +151,7 @@ public:
gcry_mpi_release(peerPublicKey);
memset(out, 0, outLength);
size_t secretBytes = (gcry_mpi_get_nbits(secret)+7/8);
size_t secretBytes = (gcry_mpi_get_nbits(secret)+7)/8;
size_t offset = _keyLength-secretBytes;
size_t nwritten;
{