@@ -128,7 +128,7 @@ static const uint32_t sha256_k[64] =
128
128
129
129
/* SHA-2 internal function */
130
130
131
- static void sha256_transf (sha256_ctx * ctx , const uint8_t * message ,
131
+ static void sha256_transf (acu_sha256_ctx * ctx , const uint8_t * message ,
132
132
uint64_t block_nb )
133
133
{
134
134
uint32_t w [64 ];
@@ -245,16 +245,16 @@ static void sha256_transf(sha256_ctx *ctx, const uint8_t *message,
245
245
246
246
/* SHA-256 functions */
247
247
248
- void sha256 (const uint8_t * message , uint64_t len , uint8_t * digest )
248
+ void acu_sha256 (const uint8_t * message , uint64_t len , uint8_t * digest )
249
249
{
250
- sha256_ctx ctx ;
250
+ acu_sha256_ctx ctx ;
251
251
252
- sha256_init (& ctx );
253
- sha256_update (& ctx , message , len );
254
- sha256_final (& ctx , digest );
252
+ acu_sha256_init (& ctx );
253
+ acu_sha256_update (& ctx , message , len );
254
+ acu_sha256_final (& ctx , digest );
255
255
}
256
256
257
- void sha256_init ( sha256_ctx * ctx )
257
+ void acu_sha256_init ( acu_sha256_ctx * ctx )
258
258
{
259
259
#ifndef UNROLL_LOOPS
260
260
int i ;
@@ -272,7 +272,7 @@ void sha256_init(sha256_ctx *ctx)
272
272
ctx -> tot_len = 0 ;
273
273
}
274
274
275
- void sha256_update ( sha256_ctx * ctx , const uint8_t * message , uint64_t len )
275
+ void acu_sha256_update ( acu_sha256_ctx * ctx , const uint8_t * message , uint64_t len )
276
276
{
277
277
uint64_t block_nb ;
278
278
uint64_t new_len , rem_len , tmp_len ;
@@ -304,7 +304,7 @@ void sha256_update(sha256_ctx *ctx, const uint8_t *message, uint64_t len)
304
304
ctx -> tot_len += (block_nb + 1 ) << 6 ;
305
305
}
306
306
307
- void sha256_final ( sha256_ctx * ctx , uint8_t * digest )
307
+ void acu_sha256_final ( acu_sha256_ctx * ctx , uint8_t * digest )
308
308
{
309
309
uint64_t block_nb ;
310
310
uint64_t pm_len ;
0 commit comments