* output = SHA-256( input buffer ) */
| 331 | * output = SHA-256( input buffer ) |
| 332 | */ |
| 333 | void sha256( const unsigned char *input, size_t ilen, |
| 334 | unsigned char output[32], int is224 ) |
| 335 | { |
| 336 | sha256_context ctx; |
| 337 | |
| 338 | sha256_init( &ctx ); |
| 339 | sha256_starts( &ctx, is224 ); |
| 340 | sha256_update( &ctx, input, ilen ); |
| 341 | sha256_finish( &ctx, output ); |
| 342 | sha256_free( &ctx ); |
| 343 | } |
| 344 | |
| 345 | #if defined(POLARSSL_FS_IO) |
| 346 | /* |
no test coverage detected