Skip to content

Commit

Permalink
fix: code linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hamada147 committed Dec 14, 2022
1 parent 755e31d commit 9774cbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ actual final class AES actual constructor(
null
}

override suspend fun encrypt(data: ByteArray): ByteArray {
override suspend fun encrypt(data: ByteArray): ByteArray {
if (ivSpec == null) {
cipher.init(Cipher.ENCRYPT_MODE, key.nativeType)
} else {
Expand All @@ -44,7 +44,7 @@ actual final class AES actual constructor(
return cipher.doFinal(data)
}

override suspend fun decrypt(data: ByteArray): ByteArray {
override suspend fun decrypt(data: ByteArray): ByteArray {
if (ivSpec == null) {
cipher.init(Cipher.DECRYPT_MODE, key.nativeType)
} else {
Expand All @@ -56,7 +56,7 @@ actual final class AES actual constructor(
actual companion object : AESKeyGeneration {
private const val AUTH_TAG_SIZE = 128

override suspend fun createRandomAESKey(algorithm: KAESAlgorithm): KMMSymmetricKey {
override suspend fun createRandomAESKey(algorithm: KAESAlgorithm): KMMSymmetricKey {
val keygen = KeyGenerator.getInstance("AES")
keygen.init(algorithm.keySize())
return KMMSymmetricKey(keygen.generateKey())
Expand Down
3 changes: 0 additions & 3 deletions aes/src/jsMain/kotlin/io.iohk.atala.prism.apollo.aes/AES.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ package io.iohk.atala.prism.apollo.aes

import io.iohk.atala.prism.apollo.utils.KMMSymmetricKey
import kotlinx.browser.window
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.asDeferred
import kotlinx.coroutines.async
import kotlinx.coroutines.await
import kotlinx.coroutines.withContext
import kotlin.js.Promise
Expand Down

0 comments on commit 9774cbc

Please sign in to comment.