sha1.h (66890) | sha1.h (92756) |
---|---|
1/* $FreeBSD: head/sys/crypto/sha1.h 66890 2000-10-09 18:49:14Z archie $ */ | 1/* $FreeBSD: head/sys/crypto/sha1.h 92756 2002-03-20 05:14:42Z alfred $ */ |
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 --- 40 unchanged lines hidden (view full) --- 50 union { 51 u_int8_t b8[64]; 52 u_int32_t b32[16]; 53 } m; 54 u_int8_t count; 55}; 56 57#ifdef _KERNEL | 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 --- 40 unchanged lines hidden (view full) --- 50 union { 51 u_int8_t b8[64]; 52 u_int32_t b32[16]; 53 } m; 54 u_int8_t count; 55}; 56 57#ifdef _KERNEL |
58extern void sha1_init __P((struct sha1_ctxt *)); 59extern void sha1_pad __P((struct sha1_ctxt *)); 60extern void sha1_loop __P((struct sha1_ctxt *, const u_int8_t *, size_t)); 61extern void sha1_result __P((struct sha1_ctxt *, caddr_t)); | 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 */ 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_*/ | 62 63/* 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_*/ |