\r
hash_copy((hash_state*)self,&temp);\r
sha_done(&temp,digest);\r
- return PyString_FromStringAndSize(digest, 32);\r
+ return PyString_FromStringAndSize((char *)digest, 32);\r
}\r
\r
#include "hash_template.c"\r
free(buffer);
return NULL;
}
- result=PyString_FromStringAndSize(buffer, len);
+ result=PyString_FromStringAndSize((char *)buffer, len);
free(buffer);
return(result);
}
free(buffer);
return NULL;
}
- result=PyString_FromStringAndSize(buffer, len);
+ result=PyString_FromStringAndSize((char *)buffer, len);
free(buffer);
return(result);
}
ALGobject *self = (ALGobject*)s;
if (strcmp(name, "IV") == 0)
{
- return(PyString_FromStringAndSize(self->IV, BLOCK_SIZE));
+ return(PyString_FromStringAndSize((char *)(self->IV), BLOCK_SIZE));
}
if (strcmp(name, "mode") == 0)
{
/* Get the raw (binary) digest value */
value = (PyObject *)hash_digest(&(self->st));
size = PyString_Size(value);
- raw_digest = PyString_AsString(value);
+ raw_digest = (unsigned char *)PyString_AsString(value);
/* Create a new string */
retval = PyString_FromStringAndSize(NULL, size * 2 );
- hex_digest = PyString_AsString(retval);
+ hex_digest = (unsigned char *)PyString_AsString(retval);
/* Make hex version of the digest */
for(i=j=0; i<size; i++)