public GetAddressFromKeyStore ( string json ) : string | ||
json | string | |
return | string |
public void ImportAccountFromJson(string password, string encryptedJson) { var keystoreservice = new Nethereum.KeyStore.KeyStoreService(); var privateKey = keystoreservice.DecryptKeyStoreFromJson(password, encryptedJson); var address = keystoreservice.GetAddressFromKeyStore(encryptedJson); this.password = password; this.publicAddress = address; this.privateKey = ConvertKey(privateKey); this.encryptedJson = encryptedJson; }
public void ImportAccountFromJson(string password, string encryptedJson) { try { var keystoreservice = new Nethereum.KeyStore.KeyStoreService(); var privateKey = keystoreservice.DecryptKeyStoreFromJson(password, encryptedJson); var address = keystoreservice.GetAddressFromKeyStore(encryptedJson); this.password = password; this.publicAddress = address; this.privateKey = ConvertKey(privateKey); this.encryptedJson = encryptedJson; } catch (DecryptionException ex) { Debug.Log("DecryptionException"); FindObjectOfType <AccountManager>().passwordNotice.enabled = true; return; } }