MCPcopy Index your code
hub / github.com/darksolopic/PasswordManagerGUI / generateSalt

Method generateSalt

PasswordManagerGUI.java:94–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92 }
93
94 private static byte[] generateSalt() {
95 byte[] salt = new byte[SALT_LENGTH];
96 new SecureRandom().nextBytes(salt);
97 return salt;
98 }
99
100 private static SecretKey deriveKey(char[] masterPassword, byte[] salt) throws Exception {
101 KeySpec spec = new PBEKeySpec(masterPassword, salt, ITERATIONS, KEY_LENGTH);

Callers 1

encryptMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected