mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Add support for endpoint checking prekey consistency.
This commit is contained in:
committed by
Alex Hart
parent
09b0f15294
commit
e1067e30de
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user