shithub: mtk

ref: a28c64afe2d7329cb68a41b277fa6645b81f312d
dir: /crc.c/

View raw version
#include <u.h>
#include <libc.h>

uchar
crc(char *s)
{
	uchar crc;
	int i, len;

	crc = 0;
	len = strlen(s);
	for(i = 1; i < len; i++)
		crc ^= s[i];
	return crc;
}