function convert_512_block_to_words($block) { $ret = array(); for ($i = 0; $i < 16; $i++) { $tmp = substr($block, $i * 32, 32); $ret[$i] = BigInt::FromBitString($tmp, 32); } return $ret; }