version 1.7, 2000/03/16 20:56:14 |
version 1.8, 2000/04/14 10:30:32 |
|
|
/* |
/* |
* radix.c |
* radix.c |
* |
* |
* base-64 encoding pinched from lynx2-7-2, who pinched it from rpem. |
* base-64 encoding pinched from lynx2-7-2, who pinched it from rpem. |
* Originally written by Mark Riordan 12 August 1990 and 17 Feb 1991 |
* Originally written by Mark Riordan 12 August 1990 and 17 Feb 1991 |
* and placed in the public domain. |
* and placed in the public domain. |
* |
* |
* Dug Song <dugsong@UMICH.EDU> |
* Dug Song <dugsong@UMICH.EDU> |
*/ |
*/ |
|
|
|
|
|
|
unsigned char pr2six[256]; |
unsigned char pr2six[256]; |
|
|
int |
int |
uuencode(unsigned char *bufin, unsigned int nbytes, char *bufcoded) |
uuencode(unsigned char *bufin, unsigned int nbytes, char *bufcoded) |
{ |
{ |
/* ENC is the basic 1 character encoding function to make a char printing */ |
/* ENC is the basic 1 character encoding function to make a char printing */ |
|
|
return (outptr - bufcoded); |
return (outptr - bufcoded); |
} |
} |
|
|
int |
int |
uudecode(const char *bufcoded, unsigned char *bufplain, int outbufsize) |
uudecode(const char *bufcoded, unsigned char *bufplain, int outbufsize) |
{ |
{ |
/* single character decode */ |
/* single character decode */ |
|
|
} |
} |
|
|
|
|
int |
int |
creds_to_radix(CREDENTIALS *creds, unsigned char *buf) |
creds_to_radix(CREDENTIALS *creds, unsigned char *buf) |
{ |
{ |
char *p, *s; |
char *p, *s; |
|
|
return (uuencode((unsigned char *)temp, len, (char *)buf)); |
return (uuencode((unsigned char *)temp, len, (char *)buf)); |
} |
} |
|
|
int |
int |
radix_to_creds(const char *buf, CREDENTIALS *creds) |
radix_to_creds(const char *buf, CREDENTIALS *creds) |
{ |
{ |
|
|