max string lenght for cakephp hash function -


is there maximum length restriction string cake hash function.

thanks

only available memory (i.e. have able load string whole). hash output has same length, though.

if want hash large data blob won't fit memory must process in chunks. php has functions (see http://nl1.php.net/manual/en/ref.hash.php). basic steps are:

  1. create hashing structure (hash_init)
  2. read chunks, update hash structure (hash_update)
  3. after last chunk, finalize hash , output (hash_final)

for convenience, php has hash_update_file , hash_update_stream wrappers.


Comments