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:
commit
117c5f4fd2
@ -84,7 +84,7 @@ class CredentialsCacheRepository @Inject constructor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getRandomKey(): String {
|
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)
|
return (1..KEY_LENGTH)
|
||||||
.map { allowedChars.random() }
|
.map { allowedChars.random() }
|
||||||
.joinToString("")
|
.joinToString("")
|
||||||
@ -102,4 +102,4 @@ sealed interface CredentialsType {
|
|||||||
val userName: String,
|
val userName: String,
|
||||||
val password: String,
|
val password: String,
|
||||||
) : CredentialsType
|
) : CredentialsType
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user