-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add endian argument to toString method #272
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature request: add
endian
(le
orbe
) argument totoString
method.Motivation: working with
ed25519
curve fromelliptic
module there is an inconvenience.ed25519
uses numbers in little endian order:There is no simple way to convert
reduced
number to hex string in little endian order.Current solution
Yep, it works, but it is a bit wired.
Additional context
It would be consistent to have
endian
argument across allto*
method:a.toArray(endian, length)
,a.toArrayLike(type, endian, length)
,a.toBuffer(endian, length)
.I think it is better to have a look at this issue in case of different bytes order: Wrong padding in toString() function #198
The text was updated successfully, but these errors were encountered: