<-- Previous || Up || Next -->

Checksum 16 Function
Checksums Class

Public Function Checksum16( _
    ByVal vValue As Variant _
    ) As Variant

"16-bit Checksum"
Generate the 16-bit checksum for the characters in string vValue.
Checksum is returned as a Long (Integer) value between 0 and 65,536.
The checksum is the sum of the ASCII values of all of the characters within the string.
Uses modulo addition so that the function will return the 16 least significant bits of the sum.

Examples:
    Checksum16("A") = 65
    Checksum16("ABCD") = 266
    Checksum16("BADC") = 266
See also:
    Checksum16File Function
    Checksum32 Function
    Checksum8 Function
vValue: String containing the characters whose ASCII values are to be added together. Function returns Null if vValue is Null or cannot be fixed up to a String.

Note: Function currently only works for characters whose ASCII value is between 0 and 255, so it does NOT support UNICODE.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.