Skip to content

Commit 1469a43

Browse files
committed
Add comments to CryptoUtils
1 parent 2e11d10 commit 1469a43

File tree

1 file changed

+11
-2
lines changed
  • org.archicontribs.modelrepository/src/org/archicontribs/modelrepository/authentication

1 file changed

+11
-2
lines changed

Diff for: org.archicontribs.modelrepository/src/org/archicontribs/modelrepository/authentication/CryptoUtils.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,16 @@ public static SecretKey generateRandomSecretKey() throws NoSuchAlgorithmExceptio
128128
}
129129

130130
/**
131-
* Generate a SecretKey from a password
131+
* Generate a SecretKey from a password using a PBE based algorithm
132+
*
133+
* Algorithms supported:
134+
*
135+
* PBEwithHmacSHA256AndAES_256
136+
* PBEWithHmacSHA1AndAES_256
137+
* PBEWithHmacSHA512AndAES_128
138+
* PBEWithHmacSHA1AndAES_128
139+
* PBEWithHmacSHA384AndAES_256
140+
* PBEWithMD5AndDES
132141
*/
133142
public static SecretKey generateKeyFromPassword(String algorithm, char[] password) throws GeneralSecurityException {
134143
// Convert the password bytes to Base64 characters because PBEKey class will not accept non-Ascii characters in a password
@@ -141,7 +150,7 @@ public static SecretKey generateKeyFromPassword(String algorithm, char[] passwor
141150
}
142151

143152
/**
144-
* Generate a SecretKey from a password using a stronger algorithm with salt and iterations
153+
* Generate a SecretKey from a password using a PBK based algorithm with salt and iterations
145154
*
146155
* Algorithms supported:
147156
*

0 commit comments

Comments
 (0)