Skip to content

Commit

Permalink
concrete return
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck committed Dec 10, 2024
1 parent 6be47c6 commit b9c0938
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bncurve/arith.nim
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,13 @@ func toBytesBE*(src: BNU256 | BNU512, dst: var openArray[byte]): bool =

true

func toBytesBE*(src: BNU256 | BNU512): array {.noinit.} =
func toBytesBE*(src: BNU256): array[32, byte] {.noinit.} =
## Convert 256bit integer ``src`` to big-endian bytes representation.
## Return ``true`` if ``dst`` was successfully set, ``false`` otherwise.

discard toBytesBE(src, result)

func toBytesBE*(src: BNU512): array[64, byte] {.noinit.} =
## Convert 256bit integer ``src`` to big-endian bytes representation.
## Return ``true`` if ``dst`` was successfully set, ``false`` otherwise.

Expand Down

0 comments on commit b9c0938

Please sign in to comment.