aboutsummaryrefslogtreecommitdiff
path: root/src/libauthsrv/nvcsum.c
blob: 306d7f7edc6f0975f5468ea0722be5fd3ff5bc95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#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;
}