We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6be47c6 commit b9c0938Copy full SHA for b9c0938
bncurve/arith.nim
@@ -306,7 +306,13 @@ func toBytesBE*(src: BNU256 | BNU512, dst: var openArray[byte]): bool =
306
307
true
308
309
-func toBytesBE*(src: BNU256 | BNU512): array {.noinit.} =
+func toBytesBE*(src: BNU256): array[32, byte] {.noinit.} =
310
+ ## Convert 256bit integer ``src`` to big-endian bytes representation.
311
+ ## Return ``true`` if ``dst`` was successfully set, ``false`` otherwise.
312
+
313
+ discard toBytesBE(src, result)
314
315
+func toBytesBE*(src: BNU512): array[64, byte] {.noinit.} =
316
## Convert 256bit integer ``src`` to big-endian bytes representation.
317
## Return ``true`` if ``dst`` was successfully set, ``false`` otherwise.
318
0 commit comments