Add support for endpoint checking prekey consistency.

This commit is contained in:
Greyson Parrelli
2024-02-26 15:59:05 -05:00
committed by Alex Hart
parent 09b0f15294
commit e1067e30de
8 changed files with 191 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2024 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.core.util
import java.nio.ByteBuffer
/**
* Converts the long into [ByteArray].
*/
fun Long.toByteArray(): ByteArray {
return ByteBuffer
.allocate(Long.SIZE_BYTES)
.putLong(this)
.array()
}