Esempio n. 1
0
 /**
  * Set the source for the key.
  *
  * @param string $source The source for the key to create.
  */
 public function set($source)
 {
     $this->hash->set($source);
 }
Esempio n. 2
0
 /**
  * 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);
 }