Hash Replication

(5 posts) (2 voices)
  1. nsepetys, Member

    Hello,

    I have been trying to replicate the hashes we have generating in our report URLs and cannot match them. The following is an example of how I've come up with the hash encoding function:

    Report Id = 289
    Procedure Name = sp_DBR_examplereport
    Folder Id = 32
    No hidden parameters
    Hash Seed = seed

    SELECT SHA1(CONCAT('289','m32','seed'));

    I have also tried variations like:

    SELECT SHA1(CONCAT('289','seed'));

    AND

    SELECT SHA1(CONCAT('sp_DBR_examplereport','m32','seed'));

    AND

    SELECT SHA1(CONCAT('sp_DBR_examplereport','seed'));

    We are currently running myDBR version 4.3.3. Any help with this function would be appreciated.

    - Noah

  2. myDBR Team, Key Master

    How does your URL look like where you use (or compare) the hash?

    if you have hash seed 'secret' and access report ID 48 and have the folder ID (1) in URL, the hash calculation would be:

    sha1('48m1secret') -> 059fcb76edb551ed2c775c7200c9b5f5b9cdb588

    and the URL would be:

    report.php?r=48&m=1&h=059fcb76edb551ed2c775c7200c9b5f5b9cdb588

    Btw, assuming you are trying just to test the hash generation as you never need to do it in SQL.

    --
    myDBR Team

  3. nsepetys, Member

    Hello myDBR representative. Thanks for your expedient response! I'm trying to calculate hash values on the fly from the database end so that's why I'm using SQL here. Your logic seems to follow the same pattern of the SQL function I was using. I would like to provide specifics of the hashes I'm comparing and using but I am not able to do that in this public forum.

  4. myDBR Team, Key Master

    You can always use the support email for sensitive data.

    --
    myDBR Team

  5. nsepetys, Member

    I have just done so. Thank you for your assistance.


Reply

You must log in to post.