Merge pull request #155 from Flashdown/Flashdown-patch-1

Credentials Cache: Added some special characters to improve random key pattern
This commit is contained in:
Abdelilah El Aissaoui 2023-09-06 09:56:00 +02:00 committed by GitHub
commit 117c5f4fd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ class CredentialsCacheRepository @Inject constructor() {
}
private fun getRandomKey(): String {
val allowedChars = ('A'..'Z') + ('a'..'z') + ('0'..'9')
val allowedChars = ('A'..'Z') + ('a'..'z') + ('0'..'9') + "#!$%=?-_.,@µ*:;+~".toList()
return (1..KEY_LENGTH)
.map { allowedChars.random() }
.joinToString("")