Deleted Added
full compact
sha1.h (92756) sha1.h (292963)
1/* $FreeBSD: head/sys/crypto/sha1.h 92756 2002-03-20 05:14:42Z alfred $ */
1/* $FreeBSD: head/sys/crypto/sha1.h 292963 2015-12-30 22:43:07Z allanjude $ */
2/* $KAME: sha1.h,v 1.5 2000/03/27 04:36:23 sumikawa Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

48 u_int64_t b64[1];
49 } c;
50 union {
51 u_int8_t b8[64];
52 u_int32_t b32[16];
53 } m;
54 u_int8_t count;
55};
2/* $KAME: sha1.h,v 1.5 2000/03/27 04:36:23 sumikawa Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

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