Last active
December 3, 2017 23:45
-
-
Save yakivmospan/a3994ba1ff317a90937cc0a7b8f233aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// On Marshmallow and higher (API 23+) | |
val builder = KeyGenParameterSpec.Builder(alias, KeyProperties.PURPOSE_ENCRYPT or KeyProperties.PURPOSE_DECRYPT) | |
builder.setKeySize(1024) | |
// On Kitkat and up to Marshmallow (API 19 - 22) | |
val builder = KeyPairGeneratorSpec.Builder(context) | |
builder.setKeySize(1024) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment