@Test public void testExportIdentity() { Identity identity = Identity.recoverIdentity(SampleKey.MNEMONIC, "xyz", SampleKey.PASSWORD, SampleKey.PASSWORD_HINT, Network.TESTNET, Metadata.NONE); try { identity.exportIdentity(SampleKey.WRONG_PASSWORD); Assert.fail("Should throw exception when export identity use wrong password"); } catch (TokenException ex) { Assert.assertEquals("Should throw invalid password", Messages.WALLET_INVALID_PASSWORD, ex.getMessage()); } Assert.assertEquals("export identity mnenmonic should be equal", SampleKey.MNEMONIC, identity.exportIdentity(SampleKey.PASSWORD)); identity.deleteIdentity(SampleKey.PASSWORD); }
public String exportIdentity(String password) { return this.keystore.decryptMnemonic(password); }
Identity { public String exportIdentity(String password) { return this.keystore.decryptMnemonic(password); } }
Identity { public String exportIdentity(String password) { return this.keystore.decryptMnemonic(password); } private  Identity(IdentityKeystore keystore); private  Identity(Metadata metadata, List<String> mnemonicCodes, String password); }
Identity { public String exportIdentity(String password) { return this.keystore.decryptMnemonic(password); } private  Identity(IdentityKeystore keystore); private  Identity(Metadata metadata, List<String> mnemonicCodes, String password); String getIdentifier(); String getIpfsId(); List<Wallet> getWallets(); Metadata getMetadata(); static Identity getCurrentIdentity(); static Identity createIdentity(String name, String password, String passwordHit, String network, String segWit); static Identity recoverIdentity(String mnemonic, String name, String password,
                                         String passwordHit, String network, String segWit); void deleteIdentity(String password); String exportIdentity(String password); void addWallet(Wallet wallet); List<Wallet> deriveWallets(List<String> chainTypes, String password); String encryptDataToIPFS(String originData); String decryptDataFromIPFS(String encryptedData); String signAuthenticationMessage(int accessTime, String deviceToken, String password); }
Identity { public String exportIdentity(String password) { return this.keystore.decryptMnemonic(password); } private  Identity(IdentityKeystore keystore); private  Identity(Metadata metadata, List<String> mnemonicCodes, String password); String getIdentifier(); String getIpfsId(); List<Wallet> getWallets(); Metadata getMetadata(); static Identity getCurrentIdentity(); static Identity createIdentity(String name, String password, String passwordHit, String network, String segWit); static Identity recoverIdentity(String mnemonic, String name, String password,
                                         String passwordHit, String network, String segWit); void deleteIdentity(String password); String exportIdentity(String password); void addWallet(Wallet wallet); List<Wallet> deriveWallets(List<String> chainTypes, String password); String encryptDataToIPFS(String originData); String decryptDataFromIPFS(String encryptedData); String signAuthenticationMessage(int accessTime, String deviceToken, String password); static Identity currentIdentity; static final String TAG; }