TWRITE_STR
TWRITE_STR(*buf, mech->elements, ((int)mech->length));
TWRITE_STR(ptr3, ap_rep.data, ap_rep.length);
TWRITE_STR(ptr, scratch.data, scratch.length);
TWRITE_STR(ptr, (unsigned char *) data->md5.contents, data->md5.length);
TWRITE_STR(ptr, (unsigned char *) credmsg.data, credmsg.length);
TWRITE_STR(ptr, (unsigned char *) ap_req.data, ap_req.length);
TWRITE_STR(*buf_out, input_token->value, input_token->length);
TWRITE_STR(*buf_out, input_token->value, input_token->length);
TWRITE_STR(*buf, mech->elements, mech->length);
TWRITE_STR(*buf, mech->elements, ((int)mech->length));
TWRITE_STR((ptr), (buf).value, (buf).length);
TWRITE_STR(*buf, mech->elements, mech->length);