Skip to content

Commit 14c4a6a

Browse files
committed
derive the hmac key correctl
1 parent 037b85b commit 14c4a6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/src/main/java/org/xmtp/android/library/Conversations.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,9 @@ data class Conversations(
324324
(thirtyDayPeriodsSinceEpoch - 1..thirtyDayPeriodsSinceEpoch + 1).forEach { value ->
325325
val info = "$value-${client.address}"
326326
val hmacKey =
327-
Crypto.calculateMac(
327+
Crypto.deriveKey(
328328
conversation.keyMaterial!!,
329+
ByteArray(0),
329330
info.toByteStringUtf8().toByteArray()
330331
)
331332
val hmacKeyData = HmacKeyData.newBuilder()

0 commit comments

Comments
 (0)