photoprism/pkg/checksum/digit.go
Michael Mayer 01da5bdec7 CRC32: Move checksum generation to a dedicated package
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-20 14:56:07 +01:00

6 lines
144 B
Go

package checksum
// Digit returns a Crc32-based checksum number between 0 and 9.
func Digit(data []byte) int {
return int(Crc32(data) % 10)
}