Skip to content

Commit

Permalink
Fixed threading bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DHuckaby committed Dec 10, 2012
1 parent 7cae192 commit e737f91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/src/com/handlerexploit/common/utils/Hashing.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ public class Hashing {
private static final char[] DIGITS = "0123456789abcdef".toCharArray();
private static final MessageDigest DIGEST = getMessageDigest("SHA-1");

public static String hashString(CharSequence input) {
public static synchronized String hashString(CharSequence input) {
if (input == null) {
return null;
}

String hash = CACHE.get(input);
if (hash != null) {
return hash;
Expand Down

0 comments on commit e737f91

Please sign in to comment.