mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 22:12:55 +00:00
Don't try to catch exceptions that'll never be thrown
This commit is contained in:
parent
66ea357f08
commit
964fc72fba
5 changed files with 15 additions and 28 deletions
|
@ -39,8 +39,7 @@ public class CryptoUtils {
|
|||
public static final int CRYPTO_SCRYPT_r = 8;
|
||||
public static final int CRYPTO_SCRYPT_p = 1;
|
||||
|
||||
public static SecretKey deriveKey(char[] password, byte[] salt, int n, int r, int p)
|
||||
throws NoSuchAlgorithmException, InvalidKeySpecException {
|
||||
public static SecretKey deriveKey(char[] password, byte[] salt, int n, int r, int p) {
|
||||
byte[] bytes = toBytes(password);
|
||||
byte[] keyBytes = SCrypt.generate(bytes, salt, n, r, p, CRYPTO_KEY_SIZE);
|
||||
return new SecretKeySpec(keyBytes, 0, keyBytes.length, "AES");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue