char * crypt0 = PL_Base64Encode(text, 0, NULL);
char * crypt0 = PL_Base64Encode((const char *)text, 0, NULL);
PRIVATE nsresult EncryptString (const char * text, char *& crypt) {  /* use SecretDecoderRing if encryption pref is set */  nsresult rv;  if (SI_GetBoolPref(pref_Crypto, PR_FALSE)) {    rv = wallet_CryptSetup();    if (NS_SUCCEEDED(rv)) {      rv = gSecretDecoderRing->EncryptString(text, &crypt);    }    if (NS_FAILED(rv)) {      gEncryptionFailure = PR_TRUE;    }    return rv;  }  /* otherwise do our own obscuring using Base64 encoding */  char * crypt0 = PL_Base64Encode(text, 0, NULL);  if (!crypt0) {    return NS_ERROR_FAILURE;  }  PRUint32 PREFIX_len = sizeof (PREFIX) - 1;  PRUint32 crypt0_len = PL_strlen(crypt0);  crypt = (char *)PR_Malloc(PREFIX_len + crypt0_len + 1);  PRUint32 i;  for (i=0; i<PREFIX_len; i++) {    crypt[i] = PREFIX[i];  }  for (i=0; i<crypt0_len; i++) {    crypt[PREFIX_len+i] = crypt0[i];  }  crypt[PREFIX_len + crypt0_len] = '\0';  WALLET_FREE(crypt0);  return NS_OK;}