ref: f2a9244e2d5cf7011c07e5a3ea34c1fa032cae5c
dir: /sys/src/cmd/unix/drawterm/libauthsrv/nvcsum.c/
#include <u.h> #include <libc.h> #include <auth.h> uchar nvcsum(void *vmem, int n) { uchar *mem, sum; int i; sum = 9; mem = vmem; for(i = 0; i < n; i++) sum += mem[i]; return sum; }