Package com.h2tcoin.takamakachain.wallet
Class SeedGenerator
- java.lang.Object
-
- com.h2tcoin.takamakachain.wallet.SeedGenerator
-
public class SeedGenerator extends Object
- Author:
- francesco.pasetto@takamaka.io
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
inizialized
static String[]
words
-
Constructor Summary
Constructors Constructor Description SeedGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
generateSeedPWH(List<String> rndWords)
static List<String>
generateWords()
It generates a random 25 list of words used for wallet creationstatic void
init()
static void
main(String[] args)
static String
toStringSeed(List<String> rndWords)
convert the seed to seed stringstatic boolean
verifySeedWords(List<String> wordsList)
-
-
-
Field Detail
-
words
public static String[] words
-
inizialized
public static boolean inizialized
-
-
Method Detail
-
init
public static void init()
-
generateWords
public static List<String> generateWords() throws NoSuchAlgorithmException
It generates a random 25 list of words used for wallet creation- Returns:
- List
of words - Throws:
NoSuchAlgorithmException
-
generateSeedPWH
public static String generateSeedPWH(List<String> rndWords) throws NoSuchAlgorithmException, HashEncodeException, InvalidKeySpecException, HashAlgorithmNotFoundException, HashProviderNotFoundException
- Parameters:
rndWords
- the generated list of words- Returns:
- String is the generated seed
- Throws:
NoSuchAlgorithmException
HashEncodeException
InvalidKeySpecException
HashAlgorithmNotFoundException
HashProviderNotFoundException
-
toStringSeed
public static String toStringSeed(List<String> rndWords)
convert the seed to seed string- Parameters:
seedArray
-- Returns:
-
main
public static void main(String[] args) throws NoSuchAlgorithmException, HashEncodeException, InvalidKeySpecException, HashAlgorithmNotFoundException, HashProviderNotFoundException
-
-