untagged – How to pass a data from Activity to RemoteDataSource in MVVM without using SharedPreferences?

I’ve a difficult question. How can I pass encrypted’s value from Activity to RemoteDataSource in MVVM without using SharedPreferences? I used Hilt DI, but I’m new at Hilt DI. Or what is the best practice to pass a data from activity to a non activity class? Thanks in advance.

in MainActivity

binding.buttonLogin.setOnClickListener {
            val clientId = binding.edittxtClientId.text.toString().trim()
            encrypted = encrypt(clientId, publicKey)
 }

in RemoteDataSource

class RemoteDataSource @Inject constructor() {

     companion object {
         var BASE_URL = "https://websitewebapi.json"
     }


    fun <Api> buildApi(
        api: Class<Api>,
        context: Context
    ): Api {

        return Retrofit.Builder()
            .baseUrl(BASE_URL)
            .client(getRetrofitClient(context))
            .addConverterFactory(GsonConverterFactory.create())
            .build()
            .create(api)
    }


    private fun getRetrofitClient(context: Context? = null): OkHttpClient {

        val encryption= ?   //encrypted's value from MainActivity

        val body = "{rn"Data":"${encryption}"rn}"
            .toRequestBody("application/json; charset=utf-8".toMediaTypeOrNull())
       ........
    }
}

in AppModule

@Module
    @InstallIn(SingletonComponent::class)
     object AppModule {
    
        @Singleton
        @Provides
        fun provideAuthApi(
            remoteDataSource: RemoteDataSource,
            @ApplicationContext context: Context
        ): AuthApi {
            return remoteDataSource.buildApi(AuthApi::class.java, context)
        }
    
        @Singleton
        @Provides
        fun provideUserApi(
            remoteDataSource: RemoteDataSource,
            @ApplicationContext context: Context
        ): UserApi {
            return remoteDataSource.buildApi(UserApi::class.java, context)
        }
    }