remove duplicated generatePairingKey

This commit is contained in:
Andrea Franz 2018-11-22 13:09:11 +01:00
parent 1ae29cd1cd
commit e781d5551f
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D
1 changed files with 0 additions and 9 deletions

View File

@ -135,15 +135,6 @@ public class Crypto {
}
}
public static byte[] generatePairingKey(char[] pairing) throws NoSuchAlgorithmException, InvalidKeySpecException {
SecretKeyFactory skf = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256");
String salt = "Status Hardware Wallet Lite";
PBEKeySpec spec = new PBEKeySpec(pairing, salt.getBytes(), 50000, 32*8);
SecretKey key = skf.generateSecret(spec);
return key.getEncoded();
}
public static byte[] randomBytes(int length) {
SecureRandom random = new SecureRandom();
byte data[] = new byte[length];