<This block is inserted in file ndslib.c, at line 730>

     /* the password string is all upper case in randbuf */
     /* a given password of 32 if assumed to be the hash */
     if (strlen(randbuf)==32) pan_hash_to_hex(randbuf,temp);
     else

<This block is inserted in file ndslib.c, at line before func nds_login>

 void pan_hash_to_hex(char *in,char *out)
 {int i;
  memset(out,0,16);
  for (i=0;i<32;i++)
   {if (isdigit(in[i])) out[i>>1]=(out[i>>1]<<(4*(i&1)))|((int)in[i]-48);
    else                out[i>>1]=(out[i>>1]<<(4*(i&1)))|((int)in[i]-55);
   }
 }