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

Feature request: allow to pass digest instead of message #4

Closed
xi opened this issue Sep 12, 2023 · 1 comment
Closed

Feature request: allow to pass digest instead of message #4

xi opened this issue Sep 12, 2023 · 1 comment

Comments

@xi
Copy link

xi commented Sep 12, 2023

tsp-client takes a message and hashes it. This is inefficient for large files because they have to be help in memory. Python 3.11 added helper functions for efficient hashing of files: https://docs.python.org/3/library/hashlib.html#file-hashing. It would be nice if we were able to use them.

I propose the extend the interface of TSPSigner.sign() so that it takes either a message or a digest. That would allow users to pass a digest without breaking backwards compatibility.

@kislyuk
Copy link
Member

kislyuk commented Sep 12, 2023

That sounds great! I'm in favor of this, PRs are welcome or I'll get to it sometime in the next few months.

mcallistersean pushed a commit to mcallistersean/tsp-client that referenced this issue Mar 14, 2024
mcallistersean pushed a commit to mcallistersean/tsp-client that referenced this issue Mar 14, 2024
mcallistersean pushed a commit to mcallistersean/tsp-client that referenced this issue Mar 14, 2024
mcallistersean pushed a commit to mcallistersean/tsp-client that referenced this issue Mar 14, 2024
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

No branches or pull requests

2 participants