Use convert()
This commit is contained in:
parent
2aa805fa52
commit
7f2a3c76e4
@ -31,7 +31,7 @@ actual object SRNG {
|
|||||||
actual fun getRandomBytes(amount: Int): UByteArray {
|
actual fun getRandomBytes(amount: Int): UByteArray {
|
||||||
memScoped {
|
memScoped {
|
||||||
val array = allocArray<UByteVar>(amount)
|
val array = allocArray<UByteVar>(amount)
|
||||||
randombytes_buf(array, amount.toULong())
|
randombytes_buf(array, amount.convert())
|
||||||
return UByteArray(amount) {
|
return UByteArray(amount) {
|
||||||
array[it]
|
array[it]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user