shithub: drawterm

Download patch

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

libauthsrv: remove opasstokey()

--- a/libauthsrv/Makefile	Sun Feb 28 03:10:45 2016
+++ b/libauthsrv/Makefile	Sun Feb 28 03:49:01 2016
@@ -14,7 +14,6 @@
 	convT2M.$O\
 	convTR2M.$O\
 	nvcsum.$O\
-	opasstokey.$O\
 	passtokey.$O\
 	_asgetpakkey.$O\
 	_asgetresp.$O\
--- a/libauthsrv/opasstokey.c	Sun Feb 28 03:10:45 2016
+++ /dev/null	Thu Apr  7 21:41:36 2022
@@ -1,29 +0,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;
-}