Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
ktlint: Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
M3DZIK committed Oct 29, 2023
1 parent 1c73f89 commit fcd953b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ktlint_standard_no-wildcard-imports = disabled
ktlint_standard_filename = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_function-naming = disabled
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ object SecretStore {
Hex.encode(
context.dataStore.readEncrypted(
KeyAlias.DataStoreEncrypted,
UserSecrets.PrivateKeyStoreKey
UserSecrets.PRIVATE_KEY_STORE_KEY
) ?: ByteArray(0)
),
secretKey =
Hex.encode(
context.dataStore.readEncrypted(
KeyAlias.DataStoreEncrypted,
UserSecrets.SecretKeyStoreKey
UserSecrets.SECRET_KEY_STORE_KEY
) ?: ByteArray(0)
)
)
Expand All @@ -67,12 +67,12 @@ object SecretStore {
suspend {
context.dataStore.writeEncrypted(
KeyAlias.DataStoreEncrypted,
UserSecrets.PrivateKeyStoreKey,
UserSecrets.PRIVATE_KEY_STORE_KEY,
Hex.decode(userSecrets.privateKey)
)
context.dataStore.writeEncrypted(
KeyAlias.DataStoreEncrypted,
UserSecrets.SecretKeyStoreKey,
UserSecrets.SECRET_KEY_STORE_KEY,
Hex.decode(userSecrets.secretKey)
)

Expand All @@ -97,8 +97,8 @@ object SecretStore {
fun delete(context: Context) {
val clearUserSecrets =
suspend {
context.dataStore.deleteEncrypted(UserSecrets.PrivateKeyStoreKey)
context.dataStore.deleteEncrypted(UserSecrets.SecretKeyStoreKey)
context.dataStore.deleteEncrypted(UserSecrets.PRIVATE_KEY_STORE_KEY)
context.dataStore.deleteEncrypted(UserSecrets.SECRET_KEY_STORE_KEY)
}

// clear data from in-memory variable
Expand All @@ -123,7 +123,7 @@ data class UserSecrets(
val secretKey: String
) {
companion object {
const val PrivateKeyStoreKey = "private_key"
const val SecretKeyStoreKey = "secret_key"
const val PRIVATE_KEY_STORE_KEY = "private_key"
const val SECRET_KEY_STORE_KEY = "secret_key"
}
}

0 comments on commit fcd953b

Please sign in to comment.