public function publicKey(User $user, $reset = false)
    {
        $model = ApiPublicPrivate::query()->firstOrNew(['user_id' => $user->id]);
        if (!$model->exists or $reset) {
            $model->public_key = hash('sha256', openssl_random_pseudo_bytes(32));
            $model->save();
        }
        return $model->public_key;
    }