Skip to content
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

Wrong message in deprecation warning #346

Closed
nmoreaud opened this issue Sep 13, 2024 · 1 comment · Fixed by #347
Closed

Wrong message in deprecation warning #346

nmoreaud opened this issue Sep 13, 2024 · 1 comment · Fixed by #347
Assignees
Labels
bug unintended behaviour in ecdsa code
Milestone

Comments

@nmoreaud
Copy link

util.string_to_number seems different from int_to_string

def int_to_string(x):  # pragma: no cover
    """Convert integer x into a string of bytes, as per X9.62."""
    # deprecated in 0.19
    warnings.warn(
        "Function is unused in library code. If you use this code, "
        "change to util.string_to_number.",
        DeprecationWarning,
    )
    assert x >= 0
    if x == 0:
        return b"\0"
    result = []
    while x:
        ordinal = x & 0xFF
        result.append(int2byte(ordinal))
        x >>= 8

    result.reverse()
    return b"".join(result)
@tomato42
Copy link
Member

true. Should be fixed by #347

@tomato42 tomato42 self-assigned this Sep 13, 2024
@tomato42 tomato42 added the bug unintended behaviour in ecdsa code label Sep 13, 2024
@tomato42 tomato42 added this to the v0.20.0 milestone Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unintended behaviour in ecdsa code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants