You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Problem using Crypto API

Accepted answer
33
Views
2
Comments
edited Aug 23, 2017 4:01PM in Customer Portal 2 comments

Content

Hi all,

We are trying to use the Crypto API to hash a key on a customer portal php page. The problem we are facing is that everything works good while being viewed in the development area, but after promoted and being viewed in production, we are receiving the following error(s):

Invalid ID: ID could not be resolved from the LookupName[(0)]; MessageDigest.Encoding.IDInvalid ID: ID could not be resolved from the LookupName[(0)]; 

 I've included a code snippet of the relevant code below.

Thanks

Version

May 2017

Code Snippet

             while($row=$accounts->next()){  
  foreach($row as $account){
    try{
     $md = new RightNow\Connect\Crypto\v1_3\MessageDigest();  
     $md->Algorithm->ID = 3; //SHA256 
     $md->Text = $account . $strKey;
     $md->Encoding->LookupName = "NONE";
     //echo "Data : " .$md->Text . "<br>";
     $md->hash();
     $hashed_text = $md->HashText;
     //echo "Output : " .bin2Hex($hashed_text)."<br>";
     
    

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!