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

sign should take a file path #304

Open
Tracked by #59
mixmix opened this issue Nov 12, 2024 · 3 comments
Open
Tracked by #59

sign should take a file path #304

mixmix opened this issue Nov 12, 2024 · 3 comments

Comments

@mixmix
Copy link
Contributor

mixmix commented Nov 12, 2024

currently CLI takes a raw string.

questions to consider in design:

  1. what is the CLI signature, e.g.
    • entropy sign-file --verifying-key alskdalksdjalksjdasdlkjasd
    • entropy sign -f /my/file.txt
  2. when it reads the file, does it assume content is utf-8 as it reads it?
    • maybe sign uses buffers in some steps, and can just pass read buffer in => to check
  3. do we still support signing strings?
@mixmix mixmix added this to the CLI completeness milestone Nov 12, 2024
@rh0delta
Copy link
Contributor

I am more inclined to use the -f option rather than creating a whole new command for signing a file. We can also update sign to be similar to how git works with commit messages where -m allows us to write a quick and easy string message

@mixmix
Copy link
Contributor Author

mixmix commented Dec 2, 2024

I like the -f as well

Tasks

  • 1. Write example code

    • the -f case
    • the string input case
  • 2. Write up the test cases

    • if we are allowing string or file, then defend against both
    • if you sign a string in a file it must behave same as signing the string?
  • 3. Research (2) above, leaving notes in this issue:

    • make sure the "file read + sign" works same as "string + sign"
    • this may be blocking on the "verify" method from SDK 🙈 (cc @frankiebee)
  • 4. Once the above are done, change status back to "Up Next", "blocked" "Needs Research"

@frankiebee frankiebee removed this from the Function Completeness milestone Dec 2, 2024
@frankiebee
Copy link
Collaborator

moving to blocked till we have the verify function fleshed out
see #79

@mixmix mixmix added this to the Function Completeness milestone Dec 4, 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

3 participants