Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help [PHP to Delphi]

Featured Replies

Posted

Hi all members , can someone help me to translate this php code to delphi?

$serialn:='SC-W0VK37682008';
$tSProductID='MODCP2XV94501MB00';
  for ($i = 1; $i <=17; $i++)
  {
    $IDENT_CODE_arr[$i]=(($serialn_arr[$i] ^ $tSProductID_arr[$i]) % 13) + 65;
  }
$IDENT_CODE_arr[18]=50;
 

$sHoldingRegisterState_arr   =  ARRAY(0, 223, 32, 240, 67, 135, 170, 11, 0, 96, 159, 159, 33, 38, 64, 53, 0, 0, 1, 0, 0, 0, 0, 0 );
  for ($i = 1; $i <=17; $i++)
 {
    $tALicenseKey_arr[$i]=$IDENT_CODE_arr[$i] ^ ($sHoldingRegisterState_arr[$i-1] ^ ($i));
    $tALicenseKey_arr[$i]=($tALicenseKey_arr[$i] % 26) + 65;
 }
$tALicenseKey[18]=50;

Thanks in advance.

Best regards. 


 

hello

 

i hope this helps

procedure Calculate;
const
    serialn = 'SC-W0VK37682008';
    tSProductID = 'MODCP2XV94501MB00';
    sHoldingRegisterState :array[0..23] of byte =
        (0, 223, 32, 240, 67, 135, 170, 11, 0, 96, 159,
        159, 33, 38, 64, 53, 0, 0, 1, 0, 0, 0, 0, 0);
var
    IDENT_CODE :array[1..18] of byte;
    tALicenseKey :array[1..18] of byte;
    i :integer;
begin
    for i := 1 to 17 do
        IDENT_CODE[i] := ((ord(serialn[i]) xor ord(tSProductID[i])) mod 13) + 65;
    IDENT_CODE[18] := 50;
    for i := 1 to 17 do
    begin
        tALicenseKey[i] := ord(IDENT_CODE[i]) xor (sHoldingRegisterState[i - 1] xor i);
        tALicenseKey[i] := (tALicenseKey[i] mod 26) + 65;
    end;
    tALicenseKey[18] := 50;
end;

 

  • Author

Thank you very much.

You're the best.

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.