Setup/UpgradeData.php
private function encryptAndSaveRefreshToken($user)
    {
        $user->setRefreshToken(
            $this->helper->encryptor->encrypt($user->getRefreshToken())
        );
        $this->userResource->save($user);
    }
private function encryptAndSaveRefreshToken($user)
    {
        $user->setRefreshToken(
            $this->helper->encryptor->encrypt($user->getRefreshToken())
        );
        $this->userResource->save($user);
    }
private function encryptAndSaveRefreshToken ( $ user ) { $ user -> setRefreshToken ( $ this -> helper -> encryptor -> encrypt ( $ user -> getRefreshToken ( ) ) ) ; $ this -> userResource -> save ( $ user ) ; }
Encrypt token and save

@param \Magento\User\Model\User $user
Encrypt token and save