Debian Codegraph @

libsha1.c

raw symbols SCIP
1 /* -*- Mode: C; c-file-style: "stroustrup" -*- */cxx . . $ `<file>/libsha1.c`/
2
3 /*
4 * Implementation of Federal Information Processing Standards Publication
5 * FIPS 180-1 (17 Apr 1995) which supersedes FIPS 180 (11 May 1993)
6 *
7 * Speed hack version optimised for speed (see also reference version)
8 * uses macros so you need to recompile, not just relink
9 *
10 * Adam Back <[email protected]>
11 *
12 */
13
14 /* define VERBOSE to get output as in fip180-1.txt */
15 #if defined( VERBOSE )
16 #include <stdio.h>
17 #endif
18 #include <string.h>
19 #include "sha1.h"cxx . . $ `<file>/sha1.h`/
20
21 static int swap_endian32cxx . . $ swap_endian32(c0a5f96701d3f89).( void*, size_t );
22
23 /* A run time endian test.
24
25 little_endian is the broken one: 80x86s, VAXs
26 big_endian is: most unix machines, RISC chips, 68000, etc
27
28 The endianess is stored in macros:
29
30 little_endian
31 and big_endian
32
33 These boolean values can be checked in your code in C expressions.
34
35 They should NOT be tested with conditional macro statements (#ifdef
36 etc).
37 */
38
39 static const int endian_testcxx . . $ endian_test. = 1;
40
41 #define little_endiancxx . . $ `libsha1.c:41:9`! ( *(char*)&endian_test == 1 )
42
43 #define big_endiancxx . . $ `libsha1.c:43:9`! ( ! little_endian )
44
45 #define make_big_endian32cxx . . $ `libsha1.c:45:9`!( data, len ) \
46 ( little_endiancxx . . $ `libsha1.c:41:9`! ? swap_endian32( data, len ) : 0 )
47
48 #define make_little_endian32cxx . . $ `libsha1.c:48:9`!( data, len ) \
49 ( little_endian ? 0 : swap_endian32( data, len ) )
50
51 #define make_local_endian32cxx . . $ `libsha1.c:51:9`!( data, len ) \
52 ( little_endiancxx . . $ `libsha1.c:41:9`! ? swap_endian32( data, len ) : 0 )
53
54 #if defined( OPENSSL )
55
56 void SHA1_Xform( word32* iv, const byte* data ) {
57 SHA1_ctx c;
58 byte d[SHA1_INPUT_BYTES];
59
60 c.h0=iv[0]; c.h1=iv[1]; c.h2=iv[2]; c.h3=iv[3]; c.h4=iv[4];
61
62 /* openSSL SHA1_Transform is in data order, trying to be helpful */
63 /* #undef SHA1_Transform */
64 /* SHA1_Transform( &c, data ); */
65
66 /* but they offer a host order version */
67 /* but they don't export it :-( */
68 /* sha1_block_asm_host_order( &c, data ); */
69
70 /* plan C, copy & convert the data on input */
71 #undef SHA1_Transform
72 if ( little_endian ) {
73 memcpy( d, data, SHA1_INPUT_BYTES );
74 make_local_endian32( d, SHA1_INPUT_WORDS );
75 SHA1_Transform( &c, d );
76 } else { /* not necessary on big endian */
77 SHA1_Transform( &c, data );
78 }
79 iv[0]=c.h0; iv[1]=c.h1; iv[2]=c.h2; iv[3]=c.h3; iv[4]=c.h4;
80 }
81
82 #else
83
84 #define mincxx . . $ `libsha1.c:84:9`!( x, y ) ( ( x ) < ( y ) ? ( x ) : ( y ) )
85
86 /********************* function used for rounds 0..19 ***********/
87
88 /* #define F1( B, C, D ) ( ( (B) & (C) ) | ( ~(B) & (D) ) ) */
89
90 /* equivalent, one less operation: */
91 #define F1cxx . . $ `libsha1.c:91:9`!( B, C, D ) ( (D) ^ ( (B) & ( (C) ^ (D) ) ) )
92
93
94 /********************* function used for rounds 20..39 ***********/
95
96 #define F2cxx . . $ `libsha1.c:96:9`!( B, C, D ) ( (B) ^ (C) ^ (D) )
97
98 /********************* function used for rounds 40..59 ***********/
99
100 /* #define F3( B, C, D ) ( (B) & (C) ) | ( (C) & (D) ) | ( (C) & (D) ) */
101
102 /* equivalent, one less operation */
103
104 #define F3cxx . . $ `libsha1.c:104:9`!( B, C, D ) ( ( (B) & ( (C) | (D) )) | ( (C) & (D) ) )
105
106 /********************* function used for rounds 60..79 ***********/
107
108 #define F4cxx . . $ `libsha1.c:108:9`!( B, C, D ) ( (B) ^ (C) ^ (D) )
109
110 #define K1cxx . . $ `libsha1.c:110:9`! 0x5A827999 /* constant used for rounds 0..19 */
111 #define K2cxx . . $ `libsha1.c:111:9`! 0x6ED9EBA1 /* constant used for rounds 20..39 */
112 #define K3cxx . . $ `libsha1.c:112:9`! 0x8F1BBCDC /* constant used for rounds 40..59 */
113 #define K4cxx . . $ `libsha1.c:113:9`! 0xCA62C1D6 /* constant used for rounds 60..79 */
114
115 /* magic constants */
116
117 #define H0cxx . . $ `libsha1.c:117:9`! 0x67452301
118 #define H1cxx . . $ `libsha1.c:118:9`! 0xEFCDAB89
119 #define H2cxx . . $ `libsha1.c:119:9`! 0x98BADCFE
120 #define H3cxx . . $ `libsha1.c:120:9`! 0x10325476
121 #define H4cxx . . $ `libsha1.c:121:9`! 0xC3D2E1F0
122
123 word32cxx . . $ `types.h:24:13`! SHA1_IVcxx . . $ SHA1_IV.[ 5 ] = { H0cxx . . $ `libsha1.c:117:9`!, H1cxx . . $ `libsha1.c:118:9`!, H2cxx . . $ `libsha1.c:119:9`!, H3cxx . . $ `libsha1.c:120:9`!, H4cxx . . $ `libsha1.c:121:9`! };
124
125 /* rotate X n bits left ( X <<< n ) */
126
127 #define Scxx . . $ `libsha1.c:127:9`!(n, X) ( ( (X) << (n) ) | ( (X) >> ( 32 - (n) ) ) )
128
129 #if defined( word64cxx . . $ `types.h:26:13`! )
130 #define SHA1_zero_bitcountcxx . . $ `libsha1.c:130:13`!( ctx ) \
131 (ctx)->bits = 0;
132 #else
133 #define SHA1_zero_bitcount( ctx ) \
134 (ctx)->lbits = 0; \
135 (ctx)->hbits = 0;
136 #endif
137
138 void SHA1_Initcxx . . $ SHA1_Init(af9674f54835bdd6).( SHA1_ctxcxx . . $ SHA1_ctx#* ctx )
139 {
140 SHA1_zero_bitcountcxx . . $ `libsha1.c:130:13`!( ctx );
141 memcpycxx . . $ memcpy(cc817cb175f282d).( ctx->Hcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#H., SHA1_IVcxx . . $ SHA1_IV., SHA1_DIGEST_BYTEScxx . . $ `sha1.h:17:9`! );
142 }
143
144 /* this is only used if you want to modify the IV */
145 /* ignore this function for purposes of the standard */
146
147 void SHA1_Init_With_IVcxx . . $ SHA1_Init_With_IV(3690833e35d3762).( SHA1_ctxcxx . . $ SHA1_ctx#* ctx,
148 const bytecxx . . $ `types.h:10:9`! user_IV[ SHA1_DIGEST_BYTEScxx . . $ `sha1.h:17:9`! ] )
149 {
150 SHA1_zero_bitcountcxx . . $ `libsha1.c:130:13`!( ctx );
151 memcpycxx . . $ memcpy(cc817cb175f282d).( ctx->Hcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#H., user_IV, SHA1_DIGEST_BYTEScxx . . $ `sha1.h:17:9`! );
152 make_local_endian32cxx . . $ `libsha1.c:51:9`!( ctx->H, SHA1_DIGEST_WORDScxx . . $ `sha1.h:16:9`! );
153 }
154
155 void SHA1_Transformcxx . . $ SHA1_Transform(7cc3180c6a470cbb).( word32cxx . . $ `types.h:24:13`! H[ SHA1_DIGEST_WORDScxx . . $ `sha1.h:16:9`! ],
156 const bytecxx . . $ `types.h:10:9`! M[ SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`! ] )
157 {
158 #ifdef COMPACT
159 int t = 0 ;
160 #endif
161 word32cxx . . $ `types.h:24:13`! A = H[ 0 ];
162 word32cxx . . $ `types.h:24:13`! B = H[ 1 ];
163 word32cxx . . $ `types.h:24:13`! C = H[ 2 ];
164 word32cxx . . $ `types.h:24:13`! D = H[ 3 ];
165 word32cxx . . $ `types.h:24:13`! E = H[ 4 ];
166 #if !defined( COMPACT )
167 word32cxx . . $ `types.h:24:13`! W[ 16 ] = {0};
168 #else
169 word32 W[ 80 ] = {0};
170 #endif
171
172 memcpycxx . . $ memcpy(cc817cb175f282d).( W, M, SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`! );
173
174 /* Use method B from FIPS-180 (see fip-180.txt) where the use of
175 temporary array W of 80 word32s is avoided by working in a circular
176 buffer of size 16 word32s.
177
178 (Chromatix: this is unreasonably slow on x86 due to register
179 pressure - going back to method A)
180 */
181
182 /********************* define some macros *********************/
183
184 /* Wc = access W as 16 word circular buffer */
185
186 #if !defined( COMPACT )
187 #define Wccxx . . $ `libsha1.c:187:9`!( t ) ( W[ (t) & 0x0F ] )
188 #else
189 #define Wc( t ) ( W[ (t) ] )
190 #endif
191
192 /* Calculate access to W array on the fly for entries 16 .. 79 */
193
194 #if !defined( COMPACT )
195 #define Wfcxx . . $ `libsha1.c:195:9`!( t ) \
196 ( Wccxx . . $ `libsha1.c:187:9`!( t ) = Scxx . . $ `libsha1.c:127:9`!( 1, Wccxx . . $ `libsha1.c:187:9`!( t ) ^ Wccxx . . $ `libsha1.c:187:9`!( t - 14 ) ^ Wccxx . . $ `libsha1.c:187:9`!( t - 8 ) ^ Wccxx . . $ `libsha1.c:187:9`!( t - 3 ) ) )
197 #else
198 #define Wf( t ) \
199 ( Wc( t ) = S( 1, Wc( t - 16 ) ^ Wc( t - 14 ) ^ Wc( t - 8 ) ^ Wc( t - 3 ) ) )
200 #endif
201
202 /* Calculate access to W virtual array calculating access to W on the fly */
203
204 #if !defined( COMPACT )
205 #define Wflycxx . . $ `libsha1.c:205:9`!( t ) ( (t) < 16 ? Wccxx . . $ `libsha1.c:187:9`!( (t) ) : Wfcxx . . $ `libsha1.c:195:9`!( (t) ) )
206 #else
207 #define Wfly( t ) ( Wc( (t) ) )
208 #endif
209
210 #if defined( VERBOSE )
211 #define REPORT( t, A, B, C, D, E ) \
212 fprintf( stderr, "t = %2d: %08X %08X %08X %08X %08X\n",\
213 t, A, B, C, D, E );
214 #else
215 #define REPORTcxx . . $ `libsha1.c:215:9`!( t, A, B, C, D, E )
216 #endif
217
218 #define ROUNDcxx . . $ `libsha1.c:218:9`!( t, A, B, C, D, E, Func, K ) \
219 E += Scxx . . $ `libsha1.c:127:9`!( 5, A ) + Func( B, C, D ) + Wflycxx . . $ `libsha1.c:205:9`!( t ) + K;\
220 B = Scxx . . $ `libsha1.c:127:9`!( 30, B ); REPORTcxx . . $ `libsha1.c:215:9`!( t, E, A, B, C, D )
221
222 /* Remove rotatation E' = D; D' = C; C' = B; B' = A; A' = E; by
223 completely unrolling and rotating the arguments to the macro ROUND
224 manually so the rotation is compiled in.
225 */
226
227 #define ROUND5cxx . . $ `libsha1.c:227:9`!( t, Func, K ) \
228 ROUNDcxx . . $ `libsha1.c:218:9`!( t + 0, A, B, C, D, E, Func, K );\
229 ROUNDcxx . . $ `libsha1.c:218:9`!( t + 1, E, A, B, C, D, Func, K );\
230 ROUNDcxx . . $ `libsha1.c:218:9`!( t + 2, D, E, A, B, C, Func, K );\
231 ROUNDcxx . . $ `libsha1.c:218:9`!( t + 3, C, D, E, A, B, Func, K );\
232 ROUNDcxx . . $ `libsha1.c:218:9`!( t + 4, B, C, D, E, A, Func, K )
233
234 #define ROUND20cxx . . $ `libsha1.c:234:9`!( t, Func, K )\
235 ROUND5cxx . . $ `libsha1.c:227:9`!( t + 0, Func, K );\
236 ROUND5cxx . . $ `libsha1.c:227:9`!( t + 5, Func, K );\
237 ROUND5cxx . . $ `libsha1.c:227:9`!( t + 10, Func, K );\
238 ROUND5cxx . . $ `libsha1.c:227:9`!( t + 15, Func, K )
239
240 /********************* use the macros *********************/
241
242 #if defined( VERBOSE ) && !defined( COMPACT )
243 for ( t = 0; t < 16; t++ ) {
244 fprintf( stderr, "W[%2d] = %08x\n", t, W[ t ] );
245 }
246 fprintf( stderr,
247 " A B C D E\n\n" );
248 #endif
249
250 #if defined( COMPACT )
251 /* initialise W buffer */
252 for ( t = 16; t < 80; t++ ) {
253 Wf( t );
254 }
255 #endif
256
257 /* rounds 0..19 */
258
259 ROUND20cxx . . $ `libsha1.c:234:9`!( 0, F1cxx . . $ `libsha1.c:91:9`!, K1cxx . . $ `libsha1.c:110:9`! );
260
261 /* rounds 21..39 */
262
263 ROUND20cxx . . $ `libsha1.c:234:9`!( 20, F2cxx . . $ `libsha1.c:96:9`!, K2cxx . . $ `libsha1.c:111:9`! );
264
265 /* rounds 40..59 */
266
267 ROUND20cxx . . $ `libsha1.c:234:9`!( 40, F3cxx . . $ `libsha1.c:104:9`!, K3cxx . . $ `libsha1.c:112:9`! );
268
269 /* rounds 60..79 */
270
271 ROUND20cxx . . $ `libsha1.c:234:9`!( 60, F4cxx . . $ `libsha1.c:108:9`!, K4cxx . . $ `libsha1.c:113:9`! );
272
273 H[ 0 ] += A;
274 H[ 1 ] += B;
275 H[ 2 ] += C;
276 H[ 3 ] += D;
277 H[ 4 ] += E;
278 }
279
280 void SHA1_Updatecxx . . $ SHA1_Update(52847939212327bf).( SHA1_ctxcxx . . $ SHA1_ctx#* ctx, const void* pdata, size_t data_len )
281 {
282 const bytecxx . . $ `types.h:10:9`!* data = (const bytecxx . . $ `types.h:10:9`!*)pdata;
283 unsigned use = 0 ;
284 unsigned mlen = 0 ;
285 #if !defined( word64cxx . . $ `types.h:26:13`! )
286 word32 low_bits = 0 ;
287 #endif
288
289 /* convert data_len to bits and add to the 64-bit bit count */
290
291 #if defined( word64cxx . . $ `types.h:26:13`! )
292 mlen = (unsigned)( ( ctx->bitscxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#bits. >> 3 ) % SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`! );
293 ctx->bitscxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#bits. += ( (word64cxx . . $ `types.h:26:13`!) data_len ) << 3;
294 #else
295 mlen = (unsigned)( ( ctx->lbits >> 3 ) % SHA1_INPUT_BYTES );
296 ctx->hbits += data_len >> 29; /* simulate 64 bit addition */
297 low_bits = data_len << 3;
298 ctx->lbits += low_bits;
299 if ( ctx->lbits < low_bits ) { ctx->hbits++; }
300 #endif
301
302 /* deal with first block */
303
304 use = (unsigned)mincxx . . $ `libsha1.c:84:9`!( (size_t)(SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`! - mlen), data_len );
305 memcpycxx . . $ memcpy(cc817cb175f282d).( ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M. + mlen, data, use );
306 mlen += use;
307 data_len -= use;
308 data += use;
309
310 while ( mlen == SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`! ) {
311 make_big_endian32cxx . . $ `libsha1.c:45:9`!( (word32cxx . . $ `types.h:24:13`!*)ctx->M, SHA1_INPUT_WORDScxx . . $ `sha1.h:15:9`! );
312 SHA1_Transformcxx . . $ SHA1_Transform(7cc3180c6a470cbb).( ctx->Hcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#H., ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M. );
313 use = (unsigned)mincxx . . $ `libsha1.c:84:9`!( SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`!, data_len );
314 memcpycxx . . $ memcpy(cc817cb175f282d).( ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M., data, use );
315 mlen = use;
316 data_len -= use;
317 data += use;
318 }
319 }
320
321 void SHA1_Finalcxx . . $ SHA1_Final(55a8d51a077ef09d).( SHA1_ctxcxx . . $ SHA1_ctx#* ctx, bytecxx . . $ `types.h:10:9`! digest[ SHA1_DIGEST_BYTEScxx . . $ `sha1.h:17:9`! ] )
322 {
323 unsigned mlen = 0 ;
324 unsigned padding = 0 ;
325 #if defined( word64cxx . . $ `types.h:26:13`! )
326 word64cxx . . $ `types.h:26:13`! temp = 0 ;
327 #endif
328
329 #if defined( word64cxx . . $ `types.h:26:13`! )
330 mlen = (unsigned)(( ctx->bitscxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#bits. >> 3 ) % SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`!);
331 #else
332 mlen = (unsigned)(( ctx->lbits >> 3 ) % SHA1_INPUT_BYTES);
333 #endif
334
335 ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M.[ mlen ] = 0x80; mlen++; /* append a 1 bit */
336 padding = SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`! - mlen;
337
338 #define BIT_COUNT_WORDScxx . . $ `libsha1.c:338:9`! 2
339 #define BIT_COUNT_BYTEScxx . . $ `libsha1.c:339:9`! ( BIT_COUNT_WORDScxx . . $ `libsha1.c:338:9`! * sizeof( word32cxx . . $ `types.h:24:13`! ) )
340
341 if ( (unsigned)padding >= BIT_COUNT_BYTEScxx . . $ `libsha1.c:339:9`! ) {
342 memsetcxx . . $ memset(d1de1e4fb215f1c6).( ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M. + mlen, 0x00, padding - BIT_COUNT_BYTEScxx . . $ `libsha1.c:339:9`! );
343 make_big_endian32cxx . . $ `libsha1.c:45:9`!( ctx->M, SHA1_INPUT_WORDScxx . . $ `sha1.h:15:9`! - BIT_COUNT_WORDScxx . . $ `libsha1.c:338:9`! );
344 } else {
345 memsetcxx . . $ memset(d1de1e4fb215f1c6).( ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M. + mlen, 0x00, SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`! - mlen );
346 make_big_endian32cxx . . $ `libsha1.c:45:9`!( ctx->M, SHA1_INPUT_WORDScxx . . $ `sha1.h:15:9`! );
347 SHA1_Transformcxx . . $ SHA1_Transform(7cc3180c6a470cbb).( ctx->Hcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#H., ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M. );
348 memsetcxx . . $ memset(d1de1e4fb215f1c6).( ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M., 0x00, SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`! - BIT_COUNT_BYTEScxx . . $ `libsha1.c:339:9`! );
349 }
350
351 #if defined( word64cxx . . $ `types.h:26:13`! )
352 if ( little_endiancxx . . $ `libsha1.c:41:9`! ) {
353 temp = ( ctx->bitscxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#bits. << 32 | ctx->bitscxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#bits. >> 32 );
354 } else {
355 temp = ctx->bitscxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#bits.;
356 }
357 memcpycxx . . $ memcpy(cc817cb175f282d).( ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M. + SHA1_INPUT_BYTEScxx . . $ `sha1.h:14:9`! - BIT_COUNT_BYTEScxx . . $ `libsha1.c:339:9`!, &temp,
358 BIT_COUNT_BYTEScxx . . $ `libsha1.c:339:9`! );
359 #else
360 memcpy( ctx->M + SHA1_INPUT_BYTES - BIT_COUNT_BYTES, &(ctx->hbits),
361 BIT_COUNT_BYTES );
362 #endif
363 SHA1_Transformcxx . . $ SHA1_Transform(7cc3180c6a470cbb).( ctx->Hcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#H., ctx->Mcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#M. );
364
365 memcpycxx . . $ memcpy(cc817cb175f282d).( digest, ctx->Hcxx . . $ $anonymous_type_e14a02f8ac1b0f5_0#H., SHA1_DIGEST_BYTEScxx . . $ `sha1.h:17:9`! );
366 make_big_endian32cxx . . $ `libsha1.c:45:9`!( digest, SHA1_DIGEST_WORDScxx . . $ `sha1.h:16:9`! );
367 }
368
369 #endif
370
371 static int swap_endian32cxx . . $ swap_endian32(c0a5f96701d3f89).( void* data, size_t len )
372 {
373 word32cxx . . $ `types.h:24:13`! tmp32 = 0 ;
374 bytecxx . . $ `types.h:10:9`!* tmp32_as_bytes = (bytecxx . . $ `types.h:10:9`!*) &tmp32;
375 word32cxx . . $ `types.h:24:13`!* data_as_word32s = (word32cxx . . $ `types.h:24:13`!*) data;
376 bytecxx . . $ `types.h:10:9`!* data_as_bytes = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! ;
377 size_t i = 0 ;
378
379 for ( i = 0; i < len; i++ ) {
380 tmp32 = data_as_word32s[ i ];
381 data_as_bytes = (bytecxx . . $ `types.h:10:9`!*) &( data_as_word32s[ i ] );
382
383 data_as_bytes[ 0 ] = tmp32_as_bytes[ 3 ];
384 data_as_bytes[ 1 ] = tmp32_as_bytes[ 2 ];
385 data_as_bytes[ 2 ] = tmp32_as_bytes[ 1 ];
386 data_as_bytes[ 3 ] = tmp32_as_bytes[ 0 ];
387 }
388 return 1;
389 }