sha1.h (6a800098cc0778c9618a89f858021624722374bd) sha1.h (c447342094276b4d604449bb776063c7b88c4992)
1/*
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 39 unchanged lines hidden (view full) ---

48 } c;
49 union {
50 u_int8_t b8[64];
51 u_int32_t b32[16];
52 } m;
53 u_int8_t count;
54};
55
1/*
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 39 unchanged lines hidden (view full) ---

48 } c;
49 union {
50 u_int8_t b8[64];
51 u_int32_t b32[16];
52 } m;
53 u_int8_t count;
54};
55
56#if defined(KERNEL) || defined(_KERNEL)
56#ifdef _KERNEL
57extern void sha1_init __P((struct sha1_ctxt *));
58extern void sha1_pad __P((struct sha1_ctxt *));
59extern void sha1_loop __P((struct sha1_ctxt *, caddr_t, size_t));
60extern void sha1_result __P((struct sha1_ctxt *, caddr_t));
61
62/* compatibilty with other SHA1 source codes */
63typedef struct sha1_ctxt SHA1_CTX;
64#define SHA1Init(x) sha1_init((x))
65#define SHA1Update(x, y, z) sha1_loop((x), (y), (z))
66#define SHA1Final(x, y) sha1_result((y), (x))
67#endif
68
69#define SHA1_RESULTLEN (160/8)
70
71#endif /*_NETINET6_SHA1_H_*/
57extern void sha1_init __P((struct sha1_ctxt *));
58extern void sha1_pad __P((struct sha1_ctxt *));
59extern void sha1_loop __P((struct sha1_ctxt *, caddr_t, size_t));
60extern void sha1_result __P((struct sha1_ctxt *, caddr_t));
61
62/* compatibilty with other SHA1 source codes */
63typedef struct sha1_ctxt SHA1_CTX;
64#define SHA1Init(x) sha1_init((x))
65#define SHA1Update(x, y, z) sha1_loop((x), (y), (z))
66#define SHA1Final(x, y) sha1_result((y), (x))
67#endif
68
69#define SHA1_RESULTLEN (160/8)
70
71#endif /*_NETINET6_SHA1_H_*/