Encrypts four numbers into string given a seed number
Declare Sub pp_nencryptx(ByVal buffer As String, ByVal number1 As Long, ByVal number2 As Long, ByVal number3 As Long, ByVal number4 As Long, ByVal seed As Long)
VOID pp_nencryptx(LPSTR buffer, LONG number1, LONG number2, LONG number3, LONG number4, LONG seed)
<buffer> is a 45 character buffer to place the resulting string
<number1> is one of the numbers to be encrypted, < 65,535
<number2> is one of the numbers to be encrypted, < 65,535
<number3> is one of the numbers to be encrypted, < 65,535
<number4> is one of the numbers to be encrypted, < 65,535
<seed> is the seed number used to encrypt the numbers, < 65,535
VOID - nothing. The encrypted string is returned through <buffer>.
Used to encrypt up to four numbers based upon a given user-definable <seed> number. This function is typically used when it is necessary to send a given number to a remote workstation such as a new number of allowed workstations. It is possible to give the user a several character string that represents the encrypted numbers. The user is not able to determine the algorithm used to change the decrypted values used by the application.
' We will encrypt 4 numbers using the computer number
' as a seed.
Dim Result As Long, buffer as String*46
Dim compno As Long, n1 As Long, n2 As Long, n3 As Long, n4 As Long
compno = pp_compno(1, "", "")
pp_nencryptx(buffer, 1, 2, 3, 4, compno)
Result = pp_ndecryptx(buffer, n1, n2, n3, n4, compno)
' n1 through n4 now equal 1 through 4, respectively