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