Pop\Crypt\Md5::setSalt PHP Метод

setSalt() публичный Метод

Method to set the salt
public setSalt ( string $salt = null ) : self
$salt string
Результат self
    public function setSalt($salt = null)
    {
        $this->salt = $salt;
        return $this;
    }

Usage Example

Пример #1
0
 public function testMd5()
 {
     $crypt = new Crypt\Md5();
     $crypt->setSalt('Test Salt');
     $this->assertEquals('Test Salt', $crypt->getSalt());
     $hash = $crypt->create('12password34');
     $this->assertTrue($crypt->verify('12password34', $hash));
 }
All Usage Examples Of Pop\Crypt\Md5::setSalt