OLD | NEW |
1 /* | 1 /* |
2 * sha1.h | 2 * sha1.h |
3 * | 3 * |
4 * interface to the Secure Hash Algorithm v.1 (SHA-1), specified in | 4 * interface to the Secure Hash Algorithm v.1 (SHA-1), specified in |
5 * FIPS 180-1 | 5 * 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 29 matching lines...) Expand all Loading... |
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 #ifndef SHA1_H | 47 #ifndef SHA1_H |
48 #define SHA1_H | 48 #define SHA1_H |
49 | 49 |
| 50 #ifdef HAVE_CONFIG_H |
| 51 #include <config.h> |
| 52 #endif |
| 53 |
50 #include "err.h" | 54 #include "err.h" |
51 #ifdef OPENSSL | 55 #ifdef OPENSSL |
52 #include <openssl/evp.h> | 56 #include <openssl/evp.h> |
53 #include <stdint.h> | 57 #include <stdint.h> |
54 | 58 |
55 typedef EVP_MD_CTX sha1_ctx_t; | 59 typedef EVP_MD_CTX sha1_ctx_t; |
56 | 60 |
57 /* | 61 /* |
58 * sha1_init(&ctx) initializes the SHA1 context ctx | 62 * sha1_init(&ctx) initializes the SHA1 context ctx |
59 * | 63 * |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 * this function does not do any of the padding required in the | 143 * this function does not do any of the padding required in the |
140 * complete sha1 function | 144 * complete sha1 function |
141 */ | 145 */ |
142 | 146 |
143 void | 147 void |
144 sha1_core(const uint32_t M[16], uint32_t hash_value[5]); | 148 sha1_core(const uint32_t M[16], uint32_t hash_value[5]); |
145 | 149 |
146 #endif /* else OPENSSL */ | 150 #endif /* else OPENSSL */ |
147 | 151 |
148 #endif /* SHA1_H */ | 152 #endif /* SHA1_H */ |
OLD | NEW |