ref: 2f9a05bc3b3e6e8af346547127988f589634c1a4
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;
}