Example #1
0
 public function testCrypt()
 {
     $string = new Str('Hello Php World');
     $this->assertTrue($string->crypt()->challenge('Hello Php World'));
     $this->assertFalse($string->challenge('Hello World'));
     // same test with custom salt
     $string = new Str('Hello Php World', md5(time()));
     $this->assertTrue($string->crypt()->challenge('Hello Php World'));
     $this->assertFalse($string->challenge('Hello World'));
 }