$ od -c -N 50000 [_CDCSL_93-16_]<1>Cedar>release>SHS>SHS.h 0000000 / * \n * C o p y r i g h t 0000020 323 1 9 9 2 b y X e r o x 0000040 C o r p o r a t i o n . A 0000060 l l r i g h t s r e s e r v 0000100 e d . \n * S e p t e m b e r 0000120 3 0 , 1 9 9 2 \n * A s 0000140 t r a i g h t f o r w a r d i 0000160 m p l e m e n t a t i o n o f 0000200 N I S T ' s p r o p o s e d 0000220 S e c u r e \n * H a s h 0000240 S t a n d a r d ( S H S ) , 0000260 d a t e d 2 2 J a n u a r 0000300 y 1 9 9 2 . \n * \n * T o 0000320 u s e : a l l o c a t e a 0000340 n S H S _ C T X a n d p a 0000360 s s i t t o S H S I n i t 0000400 ; \n * r e p e a t e d l y 0000420 c a l l S H S U p d a t e o 0000440 n s u c c e s s i v e c h u 0000460 n k s o f t h e m e s s a 0000500 g e \n * t h e n c a l l 0000520 S H S F i n a l ( h a s h , c 0000540 t x ) . \n * T h e h a s h 0000560 i s i n c t x - > s t a t 0000600 e , a s 4 b y t e i n t 0000620 e g e r s \n * a n d , p r 0000640 o p e r l y r e o r g a n i z 0000660 e d f o r e n d i a n - n e 0000700 s s , i n * h a s h . \n * 0000720 \n * T h e s e d e f i n i 0000740 t i o n s f o l l o w t h e 0000760 m o d e l o f t h e M D 0001000 5 r e f e r e n c e \n * i 0001020 m p l e m e n t a t i o n s o 0001040 i t s h o u l d b e e a 0001060 s y t o t o c o n v e r t 0001100 c l i e n t s \n * b e t w 0001120 e e n t h e t w o . H o 0001140 w e v e r , t h e t w o h 0001160 a s h f u n c t i o n s p r 0001200 o d u c e \n * d i f f e r e 0001220 n t - s i z e d h a s h e s 0001240 s o c l i e n t c o n v e r 0001260 s i o n i s s l i g h t l y 0001300 h a r d e r t h a n \n * 0001320 t r i v i a l . \n * / \n \n t y 0001340 p e d e f u n s i g n e d l 0001360 o n g U I N T 4 ; \n \n t y p e 0001400 d e f s t r u c t { \n 0001420 U I N T 4 s t a t e [ 5 ] ; 0001440 0001460 / * 0001500 s t a t e ( A B C D E ) * / 0001520 \n U I N T 4 c o u n t 0001540 [ 2 ] ; / * n 0001560 u m b e r o f b i t s * / 0001600 \n u n s i g n e d c h 0001620 a r b u f f e r [ 6 4 ] ; 0001640 0001660 / * i n p u t b u f f e r 0001700 * / \n } S H S _ C T X ; \n \n 0001720 # d e f i n e P R O T O _ L I 0001740 S T ( x ) ( ) ; \n \n v o i d 0001760 S H S I n i t P R O T O _ L I 0002000 S T ( ( S H S _ C T X * ) ) 0002020 ; \n \n v o i d S H S U p d a t 0002040 e P R O T O _ L I S T \n 0002060 ( ( S H S _ C T X * , u n 0002100 s i g n e d c h a r * , u 0002120 n s i g n e d i n t ) ) ; \n 0002140 / * S H S U p d a t e ( 0002160 c t x , b u f f e r , b y 0002200 t e s ) * / \n \t \n v o i d 0002220 S H S F i n a l P R O T O _ L 0002240 I S T ( ( u n s i g n e d c 0002260 h a r [ 2 0 ] , S H S _ C T 0002300 X * ) ) ; \n / * S H 0002320 S F i n a l ( h a s h , c t 0002340 x ) * / \n 0002347