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

Refactor CLI interface to follow unix standards #1828

Closed
2 tasks done
kevaundray opened this issue Aug 26, 2023 · 2 comments · Fixed by #1833
Closed
2 tasks done

Refactor CLI interface to follow unix standards #1828

kevaundray opened this issue Aug 26, 2023 · 2 comments · Fixed by #1833
Labels
C-bb.js Component: bb.js - wrapping bberg in js

Comments

@kevaundray
Copy link
Contributor

kevaundray commented Aug 26, 2023

This is a summary of a conversation with Charlie.

Problem

The current CLI interface does not follow common unix standards.

Solution

  • Use - to indicate whether we should print to stdout or print to a file. Example -o - vs -o filename
  • When printing to stdout use raw binary

Note

  • The doc comments should be modified appropriately in the cpp cli code to indicate that it is using raw binary.
@kevaundray kevaundray added the C-bb.js Component: bb.js - wrapping bberg in js label Aug 26, 2023
@github-project-automation github-project-automation bot moved this to Todo in A3 Aug 26, 2023
@kevaundray
Copy link
Contributor Author

Also adding that verify should now just return a 0 or 1 depending on whether we have successfully verified, instead of printing to stdout.

@kevaundray
Copy link
Contributor Author

Before I was doing std::cout << vector << stdendl but this was wrong because the << operator does not print raw bytes to stdout. Will need to add a separate method that pipes each individual byte to stdout for this

kevaundray added a commit that referenced this issue Aug 28, 2023
resolves #1828 

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bb.js Component: bb.js - wrapping bberg in js
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant