Mercurial > dropbear
annotate crypt_find_hash_id.c @ 8:059ec00f32a1 libtomcrypt
Missing ranlib in makefile for library
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 02 Jun 2004 08:31:25 +0000 |
parents | d7da3b1e1540 |
children |
rev | line source |
---|---|
0
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
2 * |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
3 * LibTomCrypt is a library that provides various cryptographic |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
4 * algorithms in a highly modular and flexible manner. |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
5 * |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
6 * The library is free for all purposes without any express |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
7 * guarantee it works. |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
8 * |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
9 * Tom St Denis, [email protected], http://libtomcrypt.org |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
10 */ |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
11 #include "mycrypt.h" |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
12 |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
13 int find_hash_id(unsigned char ID) |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
14 { |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
15 int x; |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
16 for (x = 0; x < TAB_SIZE; x++) { |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
17 if (hash_descriptor[x].ID == ID) { |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
18 return (hash_descriptor[x].name == NULL) ? -1 : x; |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
19 } |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
20 } |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
21 return -1; |
d7da3b1e1540
put back the 0.95 makefile which was inadvertently merged over
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
22 } |