changed prototype of Radix encoding to take unsigned char* instead of char*

This commit is contained in:
csoler 2016-05-10 22:17:48 -04:00
parent 9a86989060
commit 2591e3ff25
5 changed files with 10 additions and 10 deletions

View file

@ -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;

View file

@ -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