Skip to content

Commit b844067

Browse files
committed
superseeded
1 parent 12a95d7 commit b844067

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

  • api/src/main/java/com/bitsofproof/supernode/wallet

api/src/main/java/com/bitsofproof/supernode/wallet/BIP39.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import javax.crypto.BadPaddingException;
2626
import javax.crypto.Cipher;
2727
import javax.crypto.IllegalBlockSizeException;
28-
import javax.crypto.Mac;
2928
import javax.crypto.NoSuchPaddingException;
3029
import javax.crypto.SecretKey;
3130
import 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 )

0 commit comments

Comments
 (0)