Skip to content

Instantly share code, notes, and snippets.

@willyrh495
willyrh495 / EncryptionAES.kt
Created June 17, 2020 03:43
AES encryption using AndroidKeyStore
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import java.security.*
import javax.crypto.*
import javax.crypto.spec.GCMParameterSpec
import android.util.Base64
import androidx.annotation.VisibleForTesting
class EncryptionAES {