File tree Expand file tree Collapse file tree
api/src/main/java/com/bitsofproof/supernode/wallet Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525import javax .crypto .BadPaddingException ;
2626import javax .crypto .Cipher ;
2727import javax .crypto .IllegalBlockSizeException ;
28- import javax .crypto .Mac ;
2928import javax .crypto .NoSuchPaddingException ;
3029import javax .crypto .SecretKey ;
3130import javax .crypto .spec .SecretKeySpec ;
@@ -108,27 +107,6 @@ public static String encode (byte[] data, String passphrase) throws ValidationEx
108107 return getMnemonic (data );
109108 }
110109
111- public static byte [] getSeed (String mnenonic , String passphrase ) throws ValidationException
112- {
113- Mac mac ;
114- try
115- {
116- mac = Mac .getInstance ("HmacSHA512" , "BC" );
117- SecretKey seedkey = new SecretKeySpec (("mnemonic" + passphrase ).getBytes ("UTF-8" ), "HmacSHA512" );
118- mac .init (seedkey );
119- byte [] seed = mnenonic .getBytes ();
120- for ( int i = 0 ; i < 10000 ; ++i )
121- {
122- seed = mac .doFinal (seed );
123- }
124- return seed ;
125- }
126- catch ( NoSuchAlgorithmException | NoSuchProviderException | UnsupportedEncodingException | InvalidKeyException e )
127- {
128- throw new ValidationException (e );
129- }
130- }
131-
132110 public static String getMnemonic (byte [] data ) throws ValidationException
133111 {
134112 if ( data .length % 4 != 0 )
You can’t perform that action at this time.
0 commit comments