dummyIn.data = str;
dummyIn.data = (unsigned char *)str;
get_enc_params(struct encryptOptionsStr *encryptOptions){    struct envelopeOptionsStr envelopeOptions;    SECStatus rv = SECFailure;    NSSCMSMessage *env_cmsg;    NSSCMSContentInfo *cinfo;    PK11SymKey *bulkkey = NULL;    SECOidTag bulkalgtag;    int keysize;    int i, nlevels;    /*     * construct an enveloped data message to obtain bulk keys     */    if (encryptOptions->envmsg) {	env_cmsg = encryptOptions->envmsg; /* get it from an old message */    } else {	SECItem dummyOut = { 0, 0, 0 };	SECItem dummyIn  = { 0, 0, 0 };	char str[] = "Hello!";	PLArenaPool *tmparena = PORT_NewArena(1024);	dummyIn.data = str;	dummyIn.len = strlen(str);	envelopeOptions.options = encryptOptions->options;	envelopeOptions.recipients = encryptOptions->recipients;	env_cmsg = enveloped_data(envelopeOptions);	NSS_CMSDEREncode(env_cmsg, &dummyIn, &dummyOut, tmparena);	PR_Write(encryptOptions->envFile, dummyOut.data, dummyOut.len);	PORT_FreeArena(tmparena, PR_FALSE);    }    /*     * get the content info for the enveloped data      */    nlevels = NSS_CMSMessage_ContentLevelCount(env_cmsg);    for (i = 0; i < nlevels; i++) {    	SECOidTag typetag;	cinfo = NSS_CMSMessage_ContentLevel(env_cmsg, i);	typetag = NSS_CMSContentInfo_GetContentTypeTag(cinfo);	if (typetag == SEC_OID_PKCS7_DATA) {	    /*	     * get the symmetric key	     */	    bulkalgtag = NSS_CMSContentInfo_GetContentEncAlgTag(cinfo);	    keysize = NSS_CMSContentInfo_GetBulkKeySize(cinfo);	    bulkkey = NSS_CMSContentInfo_GetBulkKey(cinfo);	    break;	}    }    if (i == nlevels) {	fprintf(stderr, "%s: could not retrieve enveloped data.", progName);	goto loser;    }    encryptOptions->bulkalgtag = bulkalgtag;    encryptOptions->bulkkey = bulkkey;    encryptOptions->keysize = keysize;    rv = SECSuccess;loser:    if (env_cmsg)	NSS_CMSMessage_Destroy(env_cmsg);    return rv;}