zcash-android-wallet-sdk / cash.z.wallet.sdk.ext / SeedGenerator

SeedGenerator

class SeedGenerator
Deprecated: Do not use this because it is insecure and only intended for test code and samples. Instead, use the Android Keystore system or a 3rd party library that leverages it.

This is intentionally insecure. Wallet makers have told us storing keys is their specialty so we don't put a lot of energy here. A true implementation would create a key using user interaction, perhaps with a password they know that is never stored, along with requiring user authentication for key use (i.e. fingerprint/PIN/pattern/etc). From there, one of these approaches might be helpful to store the key securely:

https://developer.android.com/training/articles/keystore.html https://github.com/scottyab/AESCrypt-Android/blob/master/aescrypt/src/main/java/com/scottyab/aescrypt/AESCrypt.java https://github.com/iamMehedi/Secured-Preference-Store

Constructors

<init>

This is intentionally insecure. Wallet makers have told us storing keys is their specialty so we don't put a lot of energy here. A true implementation would create a key using user interaction, perhaps with a password they know that is never stored, along with requiring user authentication for key use (i.e. fingerprint/PIN/pattern/etc). From there, one of these approaches might be helpful to store the key securely:

SeedGenerator()

Companion Object Functions

getDeviceId

fun getDeviceId(appContext: Context): String