Esempio n. 1
0
        private void CreateMnemonicCustom()
        {
            Wordlist mWordlist = new Wordlist();
            var      mnemonic  = new MnemonicEx1(Wordlist.English, NWordCount.Twelve);

            if (mnemonic == null)
            {
                return;
            }

            var res = mWordlist.GetSentence(mnemonic._Indices);

            if (string.IsNullOrWhiteSpace(res))
            {
                return;
            }

            var clearres      = res.Replace("\0", " ").Split(' ');
            var resPrivatekey = mnemonic.PrivateKeyAddress;
            var showDialog    = new DialogShowWords();

            res = res.Replace("\0", " ");
            showDialog.mSeed = res;
            showDialog.Show(MainActivity.fm, "seed");

            MainActivity.Preferences.Edit().PutString("mnemonic", res).Apply();
            MainActivity.Preferences.Edit().PutString("PrKey", resPrivatekey).Apply();
        }