Handle ULong -> UInt conversions, update api to reflect stream_chacha20_ietf takes UInt for initial counter
This commit is contained in:
8 files changed
+27
-9
No files matched your search
+1
-1
@@ -1236,7 +1236,7 @@ interface JnaLibsodiumInterface : Library {
|
||||
message: ByteArray,
|
||||
messageLength: Long,
|
||||
nonce: ByteArray,
|
||||
initialCounter : Long,
|
||||
initialCounter : Int,
|
||||
key: ByteArray
|
||||
) : Int
|
||||
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ actual object Stream {
|
||||
actual fun chacha20IetfXorIc(
|
||||
message: UByteArray,
|
||||
nonce: UByteArray,
|
||||
initialCounter: ULong,
|
||||
initialCounter: UInt,
|
||||
key: UByteArray
|
||||
): UByteArray {
|
||||
val result = UByteArray(message.size)
|
||||
@@ -42,7 +42,7 @@ actual object Stream {
|
||||
message.asByteArray(),
|
||||
message.size.toLong(),
|
||||
nonce.asByteArray(),
|
||||
initialCounter.toLong(),
|
||||
initialCounter.toInt(),
|
||||
key.asByteArray()
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user