HISE Logo Forum
    • Categories
    • Register
    • Login

    Unlocker Expiring Date

    Scheduled Pinned Locked Moved General Questions
    15 Posts 2 Posters 556 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Christoph HartC
      Christoph Hart @ustk
      last edited by

      @ustk hard to guess what's wrong, I think you need to step through the debugger then to find out where it fails in the unlocked class. Just hit a breakpoint in the scripting functions and then crawl your way through it.

      ustkU 4 Replies Last reply Reply Quote 0
      • ustkU
        ustk @Christoph Hart
        last edited by

        @Christoph-Hart Investigating...

        1 Reply Last reply Reply Quote 0
        • ustkU
          ustk @Christoph Hart
          last edited by ustk

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @Christoph Hart
            last edited by ustk

            @Christoph-Hart Ok I got it to work!

            ⚠
            Although it appears that just using "0x" as argument string unlocks the product... In fact any string starting with "0x" as per the checkExpirationData method if statement will unlock successfully, returning either a delta of 19369 or 49369 days! Quite a generous demo indeed :)

            But with the intended encrypted timestamp the method returns the expected number of days (30 in my case)

            1 Reply Last reply Reply Quote 1
            • ustkU
              ustk @Christoph Hart
              last edited by ustk

              @Christoph-Hart I see that the substring of the encodedTimeString in Hise is:

              bi.parseString(encodedTimeString.substring(2), 16);
              

              It goes up to the 16th char but shouldn't it be encodedTimeString.length()?

              Mine has a bit more chars:

              0x0bf63c9d8c7c71c0f0b9b8fb4b12e460c4ab3457844f9da5decc7740f6479b2b505591e35ac8d8655cc19f5fff751d5702aef9b750b1c63f161fac9d0eb2030c
              

              This is what/ how I encode:

              $TIME = dechex(round(microtime(true) / 1000));
              
              $data['encryptedTime'] = "0x" . applyToValue($TIME, $private_keys['private_key_part1'], $private_keys['private_key_part2']);
              
              Christoph HartC 1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @ustk
                last edited by

                @ustk I think the 16 argument of the juce::BigInteger::parseString() method isn't the length but the base (so it tells it to parse it as hex number).

                ustkU 3 Replies Last reply Reply Quote 1
                • ustkU
                  ustk @Christoph Hart
                  last edited by ustk

                  @Christoph-Hart Oh you're right I just checked (and I obviously didn't read the code carefully as it's not part of the substring method...)
                  Wondering even more where my mistake is then 🤔

                  1 Reply Last reply Reply Quote 0
                  • ustkU
                    ustk @Christoph Hart
                    last edited by ustk

                    Alright, this is making me crazy, so I take a deep breath and try to simplify manually...

                    $TIME   = dechex(1673481600000); /* Today in ms */
                    $EXPIRY = dechex(1676160000000); /* Expiry in ms ($TIME + 30 days) */
                    
                    /* For the encodedTimeString */
                    $data['encodedTimeString'] = "0x" . applyToValue($TIME, $private_keys['private_key_part1'], $private_keys['private_key_part2']);
                    
                    /* For the XML containing the $EXPIRY (among the other things) */
                    $root->setAttribute("expiryTime",    $EXPIRY);
                    $root->setAttribute("expiring_mach", $MACHINE);
                    
                    $ENCRYPTED_XML = "#" . applyToValue($XML_STRING, $private_keys['private_key_part1'], $private_keys['private_key_part2']);
                    

                    Result from unlocker.checkExpirationData(encodedTimeString) => Unlocked with19400 days remaining

                    I'm just lost...

                    ustkU 1 Reply Last reply Reply Quote 0
                    • ustkU
                      ustk @ustk
                      last edited by ustk

                      This post is deleted!
                      1 Reply Last reply Reply Quote 1
                      • ustkU
                        ustk @Christoph Hart
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        53

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.9k

                        Posts