summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt/bcrypt.c
diff options
context:
space:
mode:
authorderaadt <>2003-08-07 00:30:21 +0000
committerderaadt <>2003-08-07 00:30:21 +0000
commit9f9cc8ed4f154b827f6b717b6d3cd5fbbb89ccf9 (patch)
tree5d787255fad632b9194de414f06b2abdc64ee320 /src/lib/libc/crypt/bcrypt.c
parenta020ac4fb1142d0bfea481464fcb724c23cf8e87 (diff)
downloadopenbsd-9f9cc8ed4f154b827f6b717b6d3cd5fbbb89ccf9.tar.gz
openbsd-9f9cc8ed4f154b827f6b717b6d3cd5fbbb89ccf9.tar.bz2
openbsd-9f9cc8ed4f154b827f6b717b6d3cd5fbbb89ccf9.zip
ansi
Diffstat (limited to 'src/lib/libc/crypt/bcrypt.c')
-rw-r--r--src/lib/libc/crypt/bcrypt.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/libc/crypt/bcrypt.c b/src/lib/libc/crypt/bcrypt.c
index 35959d1fc4..95251db1cd 100644
--- a/src/lib/libc/crypt/bcrypt.c
+++ b/src/lib/libc/crypt/bcrypt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bcrypt.c,v 1.17 2003/06/25 21:16:47 deraadt Exp $ */ 1/* $OpenBSD: bcrypt.c,v 1.18 2003/08/07 00:28:45 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -79,8 +79,7 @@ static char error[] = ":";
79const static u_int8_t Base64Code[] = 79const static u_int8_t Base64Code[] =
80"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 80"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
81 81
82const static u_int8_t index_64[128] = 82const static u_int8_t index_64[128] = {
83{
84 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 83 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
85 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 84 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
86 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 85 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
@@ -172,12 +171,8 @@ bcrypt_gensalt(u_int8_t log_rounds)
172/* We handle $Vers$log2(NumRounds)$salt+passwd$ 171/* We handle $Vers$log2(NumRounds)$salt+passwd$
173 i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */ 172 i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */
174 173
175char *bcrypt(const char *key, const char *salt);
176
177char * 174char *
178bcrypt(key, salt) 175bcrypt(const char *key, const char *salt)
179 const char *key;
180 const char *salt;
181{ 176{
182 blf_ctx state; 177 blf_ctx state;
183 u_int32_t rounds, i, k; 178 u_int32_t rounds, i, k;