mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
changed prototype of Radix encoding to take unsigned char* instead of char*
This commit is contained in:
parent
9a86989060
commit
2591e3ff25
5 changed files with 10 additions and 10 deletions
|
@ -101,7 +101,7 @@ again:
|
|||
/****************
|
||||
* create a radix64 encoded string.
|
||||
*/
|
||||
static void encode(const char *data,int len,std::string& out_string)
|
||||
static void encode(const unsigned char *data,int len,std::string& out_string)
|
||||
{
|
||||
char *buffer, *p;
|
||||
|
||||
|
|
|
@ -486,7 +486,9 @@ bool RsRecogn::itemToRadix64(RsItem *item, std::string &radstr)
|
|||
|
||||
/* write out the item for signing */
|
||||
uint32_t len = serialiser.size(item);
|
||||
char *buf = new char[len];
|
||||
|
||||
RsTemporaryMemory buf(len) ;
|
||||
|
||||
if (!serialiser.serialise(item, buf, &len))
|
||||
{
|
||||
return false;
|
||||
|
@ -609,7 +611,7 @@ bool RsRecogn::createTagRequest(const RsTlvSecurityKey &key, const RsGxsId &id,
|
|||
/* write out the item for signing */
|
||||
RsGxsRecognSerialiser serialiser;
|
||||
uint32_t len = serialiser.size(item);
|
||||
char *buf = new char[len];
|
||||
RsTemporaryMemory buf(len) ;
|
||||
bool serOk = serialiser.serialise(item, buf, &len);
|
||||
|
||||
if (serOk)
|
||||
|
@ -617,8 +619,6 @@ bool RsRecogn::createTagRequest(const RsTlvSecurityKey &key, const RsGxsId &id,
|
|||
Radix64::encode(buf, len, tag);
|
||||
}
|
||||
|
||||
delete []buf;
|
||||
|
||||
if (!serOk)
|
||||
{
|
||||
#ifdef DEBUG_RECOGN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue