encrypt

FaxBackX Methods

The encrypt method encrypts a plain-text user password and returns a BSTR to be used as the value for the REGISTERED_PASSWORD tag.

BSTR encrypt(
  BSTR Str // Plain-text password to encrypt
)


Parameters:
Str Plain-text password to encrypt

Return Value:
Encrypted password.

Example:
function SendCoverText( CoverText, SubjectText )
  {
  var Tl = xmlTlNew();
  xmlTlAddTag(Tl,"SEND_MESSAGE",null);
  xmlTlAddTag(Tl,"REGISTERED_NAME","User1");
  xmlTlAddTag(Tl,"REGISTERED_PASSWORD",FBX.encrypt("paswrd"));
  xmlTlAddTag(Tl,"TRANSFER_TYPE",0);   // 1= EMAIL, 0=FAX

  xmlTlCreateSection(Tl,"RECEIVER_ADDRESS","555-123-4567");
    xmlTlAddTag(Tl,"RECEIVER_NAME","MyRecipient");
  xmlTlCloseSection(Tl);
    
  xmlTlCreateSection(Tl,"CONTENT_PART",2);  // Cover Message
    xmlTlAddTag(Tl,"CONTENT_TYPE",1);       // File Type ASCII
    xmlTlAddTag(Tl,"CONTENT_DATA",Base64Encode(CoverText));
  xmlTlCloseSection(Tl);

  xmlTlCreateSection(Tl,"CUSTOM_SECTION",null);
    xmlTlAddTag(Tl,"EMAIL_SENT",0);
    xmlTlAddTag(Tl,"SUBJECT",SubjectText);
  xmlTlCloseSection(Tl);
      
  var responseXML = xmlTlSend(Tl,Domain,Server,Protocol,ProxyURL);
    
  return (xmlTlGetTag(responseXML,"STATUS_NUM"));
  }
See Also:
xmlTlNew, xmlTlAddTag, xmlTlSend, CASEncryptOnce