Skip to content

Conversation

@guillaumemichel
Copy link
Contributor

bit256.NewKey() accepts a slice (variable size), and needs to copy the bytes to an array before allocating to the heap.

If caller already has an array ([32]byte), it can now be passed directly to bit256.NewKeyFromArray() for increased efficiency.

@guillaumemichel guillaumemichel merged commit df3e0ea into main Oct 30, 2025
4 checks passed
@guillaumemichel guillaumemichel deleted the bit256/new-constructor branch October 30, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants