downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<hash_algoshash_file>
Last updated: Thu, 26 Jun 2008

hash_copy

(No version information available, might be only in CVS)

hash_copy — Copy hashing context

Description

resource hash_copy ( resource $context )

Parameters

context

Hashing context returned by hash_init().

Return Values

Returns a copy of Hashing Context resource.

Examples

Example #1 hash_copy() example

<?php
$context
= hash_init("md5");
hash_update($context, "data");

/* copy context to be able to continue using it */
$copy_context = hash_copy($context);

echo
hash_final($context), "\n";

hash_update($copy_context, "data");
echo
hash_final($copy_context), "\n";
?>

The above example will output:

8d777f385d3dfec8815d20f7496026dc
511ae0b1c13f95e5f08f1a0dd3da3d93



add a noteadd a note User Contributed Notes
Copy hashing context
There are no user contributed notes for this page.




<hash_algoshash_file>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs