MnemonicCode { public void check(List<String> words) throws MnemonicException { toEntropy(words); } MnemonicCode();  MnemonicCode(InputStream wordstream, String wordListDigest); static byte[] toSeed(List<String> words, String passphrase); static byte[] toSeed(List<String> words, String passphrase, Version version); byte[] toEntropy(List<String> words); List<String> toMnemonic(byte[] entropy); void check(List<String> words); static String BIP39_ENGLISH_SHA256; }
@Test(expected = MnemonicException.MnemonicLengthException.class) public void testBadLength() throws Exception { List<String> words = split("risk tiger venture dinner age assume float denial penalty hello"); mc.check(words); }
@Test(expected = MnemonicException.MnemonicWordException.class) public void testBadWord() throws Exception { List<String> words = split("risk tiger venture dinner xyzzy assume float denial penalty hello game wing"); mc.check(words); }
@Test(expected = MnemonicException.MnemonicChecksumException.class) public void testBadChecksum() throws Exception { List<String> words = split("bless cloud wheel regular tiny venue bird web grief security dignity zoo"); mc.check(words); }