memcpy(buf, (void*)((char*)p12cxt->buffer + p12cxt->currentpos), toread);
memcpy(buf, (char*)p12cxt->buffer + p12cxt->currentpos, toread);
p12u_DigestRead(void *arg, unsigned char *buf, unsigned long len){    int toread = len;    SEC_PKCS12DecoderContext* p12cxt = arg;    if(!buf || len == 0 || !p12cxt->buffer) {	return -1;    }    if ((p12cxt->filesize - p12cxt->currentpos) < (long)len) {        /* trying to read past the end of the buffer */        toread = p12cxt->filesize - p12cxt->currentpos;    }    memcpy(buf, (void*)((char*)p12cxt->buffer + p12cxt->currentpos), toread);    p12cxt->currentpos += toread;    return toread;}