Pop\Crypt\Sha::getSalt PHP Method

getSalt() public method

Method to get the salt
public getSalt ( ) : string
return string
    public function getSalt()
    {
        return $this->salt;
    }

Usage Example

示例#1
0
 public function testSha256()
 {
     $crypt = new Crypt\Sha();
     $crypt->setSalt('Test Salt');
     $crypt->setRounds(10000);
     $this->assertEquals('Test Salt', $crypt->getSalt());
     $this->assertEquals(10000, $crypt->getRounds());
     $hash = $crypt->create('12password34');
     $this->assertTrue($crypt->verify('12password34', $hash));
 }