772f137 Whitespace cleanup.
src/crackstation/PBKDF2/PasswordHash.java | 2 +-
src/sorcerersisle/cfpassphrase/Impl.java | 16 ++++++++--------
src/sorcerersisle/cfpassphrase/Utils.java | 8 ++++----
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/crackstation/PBKDF2/PasswordHash.java b/src/crackstation/PBKDF2/PasswordHash.java
index c8570ec..5f818c5 100644
--- a/src/crackstation/PBKDF2/PasswordHash.java
+++ b/src/crackstation/PBKDF2/PasswordHash.java
@@ -93,7 +93,7 @@ public class PasswordHash
if (Iterations == null) Iterations = PBKDF2_ITERATIONS;
if (SaltBytes == null) SaltBytes = SALT_BYTES;
if (HashBytes == null) HashBytes = HASH_BYTES;
-
+
// Generate a random salt
SecureRandom random = new SecureRandom();
byte[] salt = new byte[SaltBytes];
diff --git a/src/sorcerersisle/cfpassphrase/Impl.java b/src/sorcerersisle/cfpassphrase/Impl.java
index 6ce5ec1..7385216 100644
--- a/src/sorcerersisle/cfpassphrase/Impl.java
+++ b/src/sorcerersisle/cfpassphrase/Impl.java
@@ -163,28 +163,28 @@ public final class Impl
case unix_crypt_md5:
Parts = Hash.substring(3).split("\\$");
-
+
Info.put("Algorithm" , "md5crypt" );
Info.put("Status" , "Obsolete" );
Info.put("Salt" , Parts[0] );
Info.put("Hash" , Parts[1] );
-
+
return Info;
case unix_crypt_nthash:
-
+
Info.put("Algorithm" , "NT-Hash" );
Info.put("Status" , "Obsolete" );
Info.put("Hash" , Hash.substring(4) );
-
+
return Info;
case unix_crypt_sha256:
case unix_crypt_sha512:
Parts = Hash.substring(1).split("\\$");
-
+
Info.put("Algorithm" , "SHA-2" );
Info.put("Version" , Parts[0].equals(5) ? "256" : "512");
Info.put("Status" , "Unsupported" );
@@ -201,12 +201,12 @@ public final class Impl
Info.put("Salt" , Parts[1] );
Info.put("Hash" , Parts[2] );
}
-
+
return Info;
case sun_crypt_md5:
Parts = Hash.substring(5).split("\\$");
-
+
Info.put("Algorithm" , "SunMD5" );
Info.put("Status" , "Obsolete" );
@@ -222,7 +222,7 @@ public final class Impl
Info.put("Salt" , Parts[0] );
Info.put("Hash" , Parts[1] );
}
-
+
return Info;
default:
diff --git a/src/sorcerersisle/cfpassphrase/Utils.java b/src/sorcerersisle/cfpassphrase/Utils.java
index aad9783..9a2737f 100644
--- a/src/sorcerersisle/cfpassphrase/Utils.java
+++ b/src/sorcerersisle/cfpassphrase/Utils.java
@@ -38,19 +38,19 @@ public final class Utils
else if ( Hash.matches("^\\$s0\\$[0-9a-z]+(?:\\$[0-9A-Za-z+=/]+){2}$") )
return Algorithm.scrypt;
-
+
else if ( Hash.matches("^\\$1\\$[0-9A-Za-z./]{8}\\$[0-9A-Za-z./]{22}$") )
return Algorithm.unix_crypt_md5;
else if ( Hash.matches("^\\$3\\$\\$[0-9A-Fa-f]{32}$") )
return Algorithm.unix_crypt_nthash;
-
+
else if ( Hash.matches("^\\$5\\$(?:rounds=\\d{1,9}\\$)?[0-9A-Za-z./]{16}\\$[0-9A-Za-z./]{43}$") )
return Algorithm.unix_crypt_sha256;
-
+
else if ( Hash.matches("^\\$6\\$(?:rounds=\\d{1,9}\\$)?[0-9A-Za-z./]{16}\\$[0-9A-Za-z./]{86}$") )
return Algorithm.unix_crypt_sha512;
-
+
else if ( Hash.matches("^\\$md5(?:[$,]rounds=\\d+)?\\$[./0-9A-Za-z]+\\$[./0-9A-Za-z]+$") )
return Algorithm.sun_crypt_md5;