/core/src/main/php/util/collections/MD5HashImplementation.class.php
PHP | 28 lines | 8 code | 3 blank | 17 comment | 0 complexity | df7aaddb0240d9dd3f2fc94aa15b1892 MD5 | raw file
Possible License(s): BSD-3-Clause
- <?php
- /* This class is part of the XP framework
- *
- * $Id$
- */
- uses('util.collections.HashImplementation');
- /**
- * MD5
- *
- * @see php://md5
- * @see xp://util.collections.HashProvider
- * @test xp://net.xp_framework.unittest.util.collections.MD5HashImplementationTest:
- */
- class MD5HashImplementation extends Object implements HashImplementation {
- /**
- * Retrieve hash code for a given string
- *
- * @param string str
- * @return int hashcode
- */
- public function hashOf($str) {
- return '0x'.md5($str);
- }
- }
- ?>