View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}

{zone-data:component-name}
Zend_Filter_Hash
{zone-data}

{zone-data:proposer-list}
[~thomas]
{zone-data}

{zone-data:liaison}
TBD
{zone-data}

{zone-data:revision}
1.0 - 5 April 2010: Initial Draft.
{zone-data}

{zone-data:overview}
Zend_Filter_Hash is a filter which returned the hash for given input.
{zone-data}

{zone-data:references}
* [Crc32|http://php.net/crc32]
* [Hash|http://php.net/hash]
* [Md5|http://php.net/md5]
* [Sha1|http://php.net/sha1]
* [MHash|http://php.net/mhash]
* [Crypt|http://php.net/crypt]
{zone-data}

{zone-data:requirements}
* This component *will* return hash values for given input
* This component *will* support multiple adapters like Zend_Filter_Encrypt
{zone-data}

{zone-data:dependencies}
* Zend_Filter
{zone-data}

{zone-data:operation}
Zend_Filter_Hash provides a filter which can be used within other components which allow the usage of filters. It provides adapters for several available extensions and methods.
{zone-data}

{zone-data:milestones}
* Milestone 1: \[DONE\] Proposal finished
* Milestone 2: Proposal accepted
* Milestone 3: Working implementation
* Milestone 4: Unit tests
* Milestone 5: Documentation
* Milestone 6: Moved to core
{zone-data}

{zone-data:class-list}
* Zend_Filter_Hash
* Zend_Filter_Hash_Interface
* Zend_Filter_Hash_Crc32
* Zend_Filter_Hash_Crypt
* Zend_Filter_Hash_Md5
* Zend_Filter_Hash_MHash
* Zend_Filter_Hash_Sha1
{zone-data}

{zone-data:use-cases}
||UC-01||
Simple CRC32 hashing
{code}
$filter = new Zend_Filter_Hash('crc32');
$filter->filter('myinputdata');
{code}
||UC-02||
Blowfish hashing with salt key
{code}
$filter = new Zend_Filter_Hash(array('adapter' => 'crypt', 'algorithm' => 'blowfish', 'key' => 'mysaltkey'));
$filter->filter('myinputdata');
{code}
{zone-data}

{zone-data:skeletons}
{code}
class Zend_Filter_Hash_Interface {
public function hash($value);
}

class Zend_Filter_Hash_Crypt {
public function __construct($options);
public function getOptions();
public function setOptions($options);
public function hash($value);
public function toString();
}

class Zend_Filter_Hash_Crc32 {
public function hash($value);
}
{code}
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>