OLD | NEW |
1 /* | 1 /* |
2 * sha1.c | 2 * sha1.c |
3 * | 3 * |
4 * an implementation of the Secure Hash Algorithm v.1 (SHA-1), | 4 * an implementation of the Secure Hash Algorithm v.1 (SHA-1), |
5 * specified in FIPS 180-1 | 5 * specified in FIPS 180-1 |
6 * | 6 * |
7 * David A. McGrew | 7 * David A. McGrew |
8 * Cisco Systems, Inc. | 8 * Cisco Systems, Inc. |
9 */ | 9 */ |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 37 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
38 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 38 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
39 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 39 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
41 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 41 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
42 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 42 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
43 * OF THE POSSIBILITY OF SUCH DAMAGE. | 43 * OF THE POSSIBILITY OF SUCH DAMAGE. |
44 * | 44 * |
45 */ | 45 */ |
46 | 46 |
| 47 #ifdef HAVE_CONFIG_H |
| 48 #include <config.h> |
| 49 #endif |
47 | 50 |
48 #include "sha1.h" | 51 #include "sha1.h" |
49 | 52 |
50 debug_module_t mod_sha1 = { | 53 debug_module_t mod_sha1 = { |
51 0, /* debugging is off by default */ | 54 0, /* debugging is off by default */ |
52 "sha-1" /* printable module name */ | 55 "sha-1" /* printable module name */ |
53 }; | 56 }; |
54 | 57 |
55 /* SN == Rotate left N bits */ | 58 /* SN == Rotate left N bits */ |
56 #define S1(X) ((X << 1) | (X >> 31)) | 59 #define S1(X) ((X << 1) | (X >> 31)) |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 output[4] = be32_to_cpu(ctx->H[4]); | 399 output[4] = be32_to_cpu(ctx->H[4]); |
397 | 400 |
398 /* indicate that message buffer in context is empty */ | 401 /* indicate that message buffer in context is empty */ |
399 ctx->octets_in_buffer = 0; | 402 ctx->octets_in_buffer = 0; |
400 | 403 |
401 return; | 404 return; |
402 } | 405 } |
403 | 406 |
404 | 407 |
405 | 408 |
OLD | NEW |