Skip to content

Commit 42bc3da

Browse files
committed
perf: use md5HexPrefix for cache file naming
1 parent f85971f commit 42bc3da

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

eppo/src/main/java/cloud/eppo/android/EppoPrecomputedClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,9 +915,9 @@ public CompletableFuture<EppoPrecomputedClient> buildAndInitAsync() {
915915

916916
// Create configuration store
917917
if (configStore == null) {
918-
// Use MD5 hash of subject key to ensure consistent length and privacy
918+
// Use MD5 hash prefix of subject key to ensure consistent length and privacy
919919
String subjectKeyHash =
920-
ObfuscationUtils.md5Hex(subjectKey, null).substring(0, SUBJECT_KEY_HASH_LENGTH);
920+
ObfuscationUtils.md5HexPrefix(subjectKey, null, SUBJECT_KEY_HASH_LENGTH);
921921
String cacheFileNameSuffix = safeCacheKey(apiKey) + "-" + subjectKeyHash;
922922
configStore = new PrecomputedConfigurationStore(application, cacheFileNameSuffix);
923923
}

0 commit comments

Comments
 (0)