Line data Source code
1 : #include "fd_poh.h" 2 : 3 : void * 4 : fd_poh_append( void * poh, 5 0 : ulong n ) { 6 0 : fd_sha256_hash_32_repeated( poh, poh, n ); 7 0 : return poh; 8 0 : } 9 : 10 : void * 11 : fd_poh_mixin( void * FD_RESTRICT poh, 12 0 : uchar const * FD_RESTRICT mixin ) { 13 0 : fd_sha256_t sha; 14 0 : fd_sha256_init( &sha ); 15 0 : fd_sha256_append( &sha, poh, FD_SHA256_HASH_SZ ); 16 0 : fd_sha256_append( &sha, mixin, FD_SHA256_HASH_SZ ); 17 0 : fd_sha256_fini( &sha, poh ); 18 0 : return poh; 19 0 : }