public function testFail() { $input = str_repeat('A', rand(0, 10000)); $key = str_repeat('A', rand(10, 100)); $cost = 1; $output = Hash::make($input, $key, $cost); $this->assertTrue(Hash::verify($input, $output, $key)); for ($i = 0; $i < 10; $i++) { $corrupt = self::swaprandbyte($output); $this->assertFalse(Hash::verify($input, $corrupt, $key)); } }