File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
lib/sdk/server/src/main/java/com/launchdarkly/sdk/server Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 77
88import org .apache .commons .codec .digest .DigestUtils ;
99
10- import java .nio .charset .StandardCharsets ;
11- import java .nio .CharBuffer ;
12- import java .security .MessageDigest ;
13-
1410/**
1511 * Encapsulates the logic for percentage rollouts.
1612 */
@@ -63,9 +59,7 @@ static float computeBucketValue(
6359 }
6460
6561 // turn the first 15 hex digits of this into a long
66- MessageDigest digest = DigestUtils .getSha1Digest ();
67- digest .update (StandardCharsets .UTF_8 .encode (CharBuffer .wrap (keyBuilder )));
68- byte [] hash = digest .digest ();
62+ byte [] hash = DigestUtils .sha1 (keyBuilder .toString ());
6963 long longVal = 0 ;
7064 for (int i = 0 ; i < 7 ; i ++) {
7165 longVal <<= 8 ;
You can’t perform that action at this time.
0 commit comments