Pop\Crypt\Sha::getBits PHP Method

getBits() public method

Method to get the bits
public getBits ( ) : integer
return integer
    public function getBits()
    {
        return $this->bits;
    }

Usage Example

示例#1
0
 public function testSha512()
 {
     $crypt = new Crypt\Sha(512);
     $crypt->setRounds(1000000000);
     $this->assertEquals(999999999, $crypt->getRounds());
     $crypt->setRounds(100);
     $this->assertEquals(1000, $crypt->getRounds());
     $this->assertEquals(512, $crypt->getBits());
     $hash = $crypt->create('12password34');
     $this->assertTrue($crypt->verify('12password34', $hash));
 }