BNLS Checksum Algorithm
The BNLS checksum algorithm calculates the checksum of a password using the 32-bit server code received in BNLS_AUTHORIZE (0x0e).
You should create the BNLS checksum as follows:
- Create an ANSI string whose length is the length of the password + 8 characters.
- Copy the password to the beginning. (Note that the password is case sensitive.)
- In the last 8 characters, store the hexadecimal representation of the server code, in uppercase, padded with zeroes on the left.
- Calculate the standard CRC-32 checksum (using the standard polynomial 0xEDB88320) of the string.
The result is the BNLS checksum, to be sent in BNLS_AUTHORIZEPROOF (0x0f).
Source code for this procedure is available in Visual Basic
In the sample code, the checksum for BNLS_AUTHORIZEPROOF (0x0f) is the return value of BNLSChecksum(AuthPassword, ServerCode), where ServerCode is the value from BNLS_AUTHORIZE (0x0e).
These sample checksums can be used to check the correctness of your code:
BNLSChecksum("Sample", 0x0123ABCD) == 0x12FDED88
BNLSChecksum("Checksums", 0xBAADF00D) == 0x0098F911