@Test public void testValidateMnemonic() { try { List<String> mnemonic = Arrays.asList(SampleKey.MNEMONIC.split(" ")); MnemonicUtil.validateMnemonics(mnemonic); assertTrue(true); } catch (TokenException ex) { fail("Should not throw any exception"); } }
public static void validateMnemonics(List<String> mnemonicCodes) { try { MnemonicCode.INSTANCE.check(mnemonicCodes); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicLengthException e) { throw new TokenException(Messages.MNEMONIC_INVALID_LENGTH); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicWordException e) { throw new TokenException(Messages.MNEMONIC_BAD_WORD); } catch (Exception e) { throw new TokenException(Messages.MNEMONIC_CHECKSUM); } }
MnemonicUtil { public static void validateMnemonics(List<String> mnemonicCodes) { try { MnemonicCode.INSTANCE.check(mnemonicCodes); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicLengthException e) { throw new TokenException(Messages.MNEMONIC_INVALID_LENGTH); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicWordException e) { throw new TokenException(Messages.MNEMONIC_BAD_WORD); } catch (Exception e) { throw new TokenException(Messages.MNEMONIC_CHECKSUM); } } }
MnemonicUtil { public static void validateMnemonics(List<String> mnemonicCodes) { try { MnemonicCode.INSTANCE.check(mnemonicCodes); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicLengthException e) { throw new TokenException(Messages.MNEMONIC_INVALID_LENGTH); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicWordException e) { throw new TokenException(Messages.MNEMONIC_BAD_WORD); } catch (Exception e) { throw new TokenException(Messages.MNEMONIC_CHECKSUM); } }  }
MnemonicUtil { public static void validateMnemonics(List<String> mnemonicCodes) { try { MnemonicCode.INSTANCE.check(mnemonicCodes); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicLengthException e) { throw new TokenException(Messages.MNEMONIC_INVALID_LENGTH); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicWordException e) { throw new TokenException(Messages.MNEMONIC_BAD_WORD); } catch (Exception e) { throw new TokenException(Messages.MNEMONIC_CHECKSUM); } }  static void validateMnemonics(List<String> mnemonicCodes); static List<String> randomMnemonicCodes(); }
MnemonicUtil { public static void validateMnemonics(List<String> mnemonicCodes) { try { MnemonicCode.INSTANCE.check(mnemonicCodes); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicLengthException e) { throw new TokenException(Messages.MNEMONIC_INVALID_LENGTH); } catch (org.bitcoinj.crypto.MnemonicException.MnemonicWordException e) { throw new TokenException(Messages.MNEMONIC_BAD_WORD); } catch (Exception e) { throw new TokenException(Messages.MNEMONIC_CHECKSUM); } }  static void validateMnemonics(List<String> mnemonicCodes); static List<String> randomMnemonicCodes();  }