rfc:hash-context.as-resource

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:hash-context.as-resource [2017/01/17 22:52] – oops, wrong date pollitarfc:hash-context.as-resource [2017/01/18 16:45] – Typo pollita
Line 10: Line 10:
  
 ===== Proposal ===== ===== Proposal =====
-Convert the opaque resource to an opaque object.  This is the lightest touch change to ensure that existing code should continue to function unless it has explciit is_resource() checks.  These checks can be easily replaced with is_resource|is_object checks instead.+Convert the opaque resource to an opaque object.  This is the lightest touch change to ensure that existing code should continue to function unless it has explicit is_resource() checks.  These checks can be easily replaced with is_resource|is_object checks instead.
  
 ===== Future Scope ===== ===== Future Scope =====
Line 41: Line 41:
  
   * "Frozen": Only apply [[https://github.com/php/php-src/pull/2309/commits/e29923471b54b5b0712978274404c37f34d34ea6 | the original patch]] which will invalidate the HashContext object upon calling hash_final().  This is consistent with the current behavior of the resource, but inconsistent with most class/object definitions in PHP.   * "Frozen": Only apply [[https://github.com/php/php-src/pull/2309/commits/e29923471b54b5b0712978274404c37f34d34ea6 | the original patch]] which will invalidate the HashContext object upon calling hash_final().  This is consistent with the current behavior of the resource, but inconsistent with most class/object definitions in PHP.
-  * "Reentrant": Apply both diffs in [[https://github.com/php/php-src/pull/2309|PR#2309]] which will allow contexts to continue functioning after calling hash_final().+  * "Reentrant": Apply both diffs in [[https://github.com/php/php-src/pull/2309|PR#2309]] which will allow contexts to continue functioning after calling hash_final() by effectively performing: $saved = hash_copy($ctx); $ret = hash_final($ctx); $ctx = $saved;
  
 <doodle title="Merge one or both diffs" auth="sgolemon" voteType="single" closed="false"> <doodle title="Merge one or both diffs" auth="sgolemon" voteType="single" closed="false">
rfc/hash-context.as-resource.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1