repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix mdoc(7)/man(7) mix up.
[netbsd-mini2440.git]
/
lib
/
libcrypt
/
util.c
blob
475b9cbda7c2ad60f5120fe42850a41fcfb05bec
1
#include <sys/cdefs.h>
2
#if !defined(lint)
3
__RCSID
(
"$NetBSD$"
);
4
#endif
/* not lint */
5
6
#include <sys/types.h>
7
8
#include
"crypt.h"
9
10
static const unsigned char
itoa64
[] =
/* 0 ... 63 => ascii - 64 */
11
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
;
12
13
void
14
__crypt_to64
(
char
*
s
,
u_int32_t v
,
int
n
)
15
{
16
17
while
(--
n
>=
0
) {
18
*
s
++ =
itoa64
[
v
&
0x3f
];
19
v
>>=
6
;
20
}
21
}