TclPKCS11

Check-in [35de72dc72]
Login

Check-in [35de72dc72]

Overview
Comment:Fixed issue with bytearray conversion
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 35de72dc7206b127f0b9d98b81509325152c2294aabd727720ec6a9ddb1eda36
User & Date: rkeene on 2010-10-10 17:59:40
Other Links: manifest | tags
Context
2010-10-10
18:04
Added Makearch header file check-in: c7822f2b4c user: rkeene tags: trunk
17:59
Fixed issue with bytearray conversion check-in: 35de72dc72 user: rkeene tags: trunk
17:56
Updated to not call Tcl_ObjPrintf() since this is not in Tcl 8.4 check-in: 774b9d1bc0 user: rkeene tags: trunk
Changes

Modified tclpkcs11.c from [adf04fca8e] to [c3ee986c0c].

246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
	char buf[1024];

	if (data == NULL) {
		return(retval);
	}

	for (bufidx = idx = 0; (idx < datalen) && (bufidx < sizeof(buf)); idx++) {
		buf[bufidx++] = (data[idx] >> 4) & 0xf;
		buf[bufidx++] = data[idx] & 0xf;
	}

	retval = Tcl_NewByteArrayObj(buf, bufidx);

	return(retval);
}








|
|







246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
	char buf[1024];

	if (data == NULL) {
		return(retval);
	}

	for (bufidx = idx = 0; (idx < datalen) && (bufidx < sizeof(buf)); idx++) {
		buf[bufidx++] = alphabet[(data[idx] >> 4) & 0xf];
		buf[bufidx++] = alphabet[data[idx] & 0xf];
	}

	retval = Tcl_NewByteArrayObj(buf, bufidx);

	return(retval);
}