Fix moar ktlint issues

This commit is contained in:
Benoit Marty
2024-01-11 09:41:14 +01:00
committed by Benoit Marty
parent d3830af78b
commit 378692f743
528 changed files with 146 additions and 629 deletions

View File

@@ -31,7 +31,6 @@ import javax.inject.Inject
*/
@ContributesBinding(AppScope::class)
class AESEncryptionDecryptionService @Inject constructor() : EncryptionDecryptionService {
override fun createEncryptionCipher(key: SecretKey): Cipher {
return Cipher.getInstance(AESEncryptionSpecs.CIPHER_TRANSFORMATION).apply {
init(Cipher.ENCRYPT_MODE, key)

View File

@@ -27,7 +27,6 @@ internal const val ANDROID_KEYSTORE = "AndroidKeyStore"
@ContributesTo(AppScope::class)
@Module
object CryptographyModule {
@Provides
fun providesAndroidKeyStore(): KeyStore {
return KeyStore.getInstance(ANDROID_KEYSTORE).apply {

View File

@@ -38,7 +38,6 @@ import javax.inject.Inject
class KeyStoreSecretKeyRepository @Inject constructor(
private val keyStore: KeyStore,
) : SecretKeyRepository {
// False positive lint issue
@SuppressLint("WrongConstant")
override fun getOrCreateKey(alias: String, requiresUserAuthentication: Boolean): SecretKey {

View File

@@ -24,7 +24,6 @@ import java.security.GeneralSecurityException
import javax.crypto.KeyGenerator
class AESEncryptionDecryptionServiceTest {
private val encryptionDecryptionService = AESEncryptionDecryptionService()
@Test

View File

@@ -22,7 +22,6 @@ import javax.crypto.KeyGenerator
import javax.crypto.SecretKey
class SimpleSecretKeyRepository : SecretKeyRepository {
private var secretKeyForAlias = HashMap<String, SecretKey>()
override fun getOrCreateKey(alias: String, requiresUserAuthentication: Boolean): SecretKey {