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(); }