mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Move private fun
This commit is contained in:
parent
a44d00a31c
commit
401b5e2b7a
1 changed files with 11 additions and 11 deletions
|
@ -46,17 +46,6 @@ internal class DefaultIdentityBulkLookupTask @Inject constructor(
|
|||
@UserId private val userId: String
|
||||
) : IdentityBulkLookupTask {
|
||||
|
||||
private fun getHashedAddresses(threePids: List<ThreePid>, pepper: String): List<String> {
|
||||
return withOlmUtility { olmUtility ->
|
||||
threePids.map { threePid ->
|
||||
base64ToBase64Url(
|
||||
olmUtility.sha256(threePid.value.toLowerCase(Locale.ROOT)
|
||||
+ " " + threePid.toMedium() + " " + pepper)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun execute(params: IdentityBulkLookupTask.Params): List<FoundThreePid> {
|
||||
val identityAPI = getIdentityApiAndEnsureTerms(identityApiProvider, userId)
|
||||
val identityData = identityStore.getIdentityData() ?: throw IdentityServiceError.NoIdentityServerConfigured
|
||||
|
@ -124,6 +113,17 @@ internal class DefaultIdentityBulkLookupTask @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun getHashedAddresses(threePids: List<ThreePid>, pepper: String): List<String> {
|
||||
return withOlmUtility { olmUtility ->
|
||||
threePids.map { threePid ->
|
||||
base64ToBase64Url(
|
||||
olmUtility.sha256(threePid.value.toLowerCase(Locale.ROOT)
|
||||
+ " " + threePid.toMedium() + " " + pepper)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun fetchHashDetails(identityAPI: IdentityAPI): IdentityHashDetailResponse {
|
||||
return executeRequest(null) {
|
||||
apiCall = identityAPI.hashDetails()
|
||||
|
|
Loading…
Reference in a new issue