예제 #1
0
파일: HashKey.php 프로젝트: mohiva/common
 /**
  * Set the source for the key.
  *
  * @param string $source The source for the key to create.
  */
 public function set($source)
 {
     $this->hash->set($source);
 }
예제 #2
0
파일: HashTest.php 프로젝트: mohiva/common
 /**
  * Test if the `__toString` method returns a hash.
  */
 public function testToStringReturnsHash()
 {
     $key = new Hash(Hash::ALGO_CRC32);
     $key->set('A value');
     $this->assertSame(hash('crc32', 'A value'), (string) $key);
 }