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