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

Checksum 8 Function
Checksums Class

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

"8-bit Checksum"
Generate the 8-bit checksum for the characters in string vValue.
The checksum is the sum of the ASCII values of all of the characters within the string.
Checksum is returned as a one-character string.
Uses modulo addition so that the function will return the 8 least significant bits of the sum.

    Checksum8("A") = "A"
    Checksum8("ABCD") = Chr$(10)
    Checksum8("BADC") = Chr$(10)
See also:
    Checksum8File Function
    ChecksumX Function
    Checksum16 Function
    Checksum32 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.