shithub: drawterm-fdroid

Download patch

ref: 15d8e4cb1d10c094e5fafb5fafab3cd067b716e4
parent: aa8d3d79058ebcc5437e6d2f3d32d703cdac5c61
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 28 04:49:01 EST 2016

libauthsrv: remove opasstokey()

--- a/libauthsrv/Makefile
+++ b/libauthsrv/Makefile
@@ -14,7 +14,6 @@
 	convT2M.$O\
 	convTR2M.$O\
 	nvcsum.$O\
-	opasstokey.$O\
 	passtokey.$O\
 	_asgetpakkey.$O\
 	_asgetresp.$O\
--- a/libauthsrv/opasstokey.c
+++ /dev/null
@@ -1,29 +1,0 @@
-#include <u.h>
-#include <libc.h>
-#include <authsrv.h>
-
-int
-opasstokey(char *key, char *p)
-{
-	uchar t[10];
-	int c, n;
-
-	n = strlen(p);
-	memset(t, ' ', sizeof t);
-	if(n < 5)
-		return 0;
-	if(n > 10)
-		n = 10;
-	strncpy((char*)t, p, n);
-	if(n >= 9){
-		c = p[8] & 0xf;
-		if(n == 10)
-			c += p[9] << 4;
-		for(n = 0; n < 8; n++)
-			if(c & (1 << n))
-				t[n] -= ' ';
-	}
-	for(n = 0; n < 7; n++)
-		key[n] = (t[n] >> n) + (t[n+1] << (8 - (n+1)));
-	return 1;
-}