Airship\Engine\Security\Authentication::__construct PHP Method

__construct() public method

Authentication constructor.
public __construct ( EncryptionKey $key, Airship\Engine\Contract\DBInterface $db = null )
$key EncryptionKey
$db Airship\Engine\Contract\DBInterface
    public function __construct(EncryptionKey $key, DBInterface $db = null)
    {
        $this->key = $key;
        // 504 bits of entropy; good luck
        $dummy = Base64::encode(\random_bytes(63));
        $this->dummyHash = Password::hash($dummy, $this->key);
        $this->db = $db ?? \Airship\get_database();
        $this->registerMigrations();
    }