Enter a test credit card number here:

CLIENT= %HZE_CLIENT
CREDTEST= %HZV_CREDTEST
Last 2 of Client = %HZE_02R_CLIENT
First 2 of Credtest = %HZV_02L_CREDTEST
SCRAMBLER = %HZV_scrambler

The credit card number is 16 digits long.
SCRAMBLER = %HZV_SCRAMBLER
The first ten digits of the card are %HZV_10L_CREDTEST
The scrambler variable is = %HZV_SCRAM
The last six digits of the card number plus the scrambler variable = %HZV_SCRAM

The credit card number is 15 digits long.
SCRAMBLER = %HZV_SCRAMBLER
The first nine digits of the card are %HZV_09L_CREDTEST
The last six digits plus the scrambler variable = %HZV_SCRAM
The last six digits of the card number plus the scrambler variable = %HZV_SCRAM

The credit card number is 14 digits long.
SCRAMBLER = %HZV_SCRAMBLER
The first eight digits of the card are %HZV_08L_CREDTEST
The last six digits plus the scrambler variable = %HZV_SCRAM
The last six digits of the card number plus the scrambler variable = %HZV_SCRAM

The credit card number is 13 digits long.
SCRAMBLER = %HZV_SCRAMBLER
The first seven digits of the card are %HZV_07L_CREDTEST
The last six digits plus the scrambler variable = %HZV_SCRAM
The last six digits of the card number plus the scrambler variable = %HZV_SCRAM

The scrambled card number is %HZV_scrambled_cred.
The credit card number is not between 13 and 16 digits long.
The number in clear is %HZV_credtest.

To derive the original credit card number, multiply the first two digits of the card number by the last two digits of the client number, and use the six right-hand digits of that number. Subtract that result from the scrambled card number.

Decryption result: %HZV_FRONT%HZV_06R_descrambled.