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

Port the sha256 shell to go code #519

Conversation

naveensrinivasan
Copy link
Collaborator

The goal for this port from shell script to go was to reduce the
amount of shell script.

It is easier to refactor managed code compared to shell script.

This has been discussed #398

Signed-off-by: naveensrinivasan 172697+naveensrinivasan@users.noreply.github.com

The goal for this port from shell script to `go` was to reduce the
amount of shell script.

It is easier to refactor managed code compared to shell script.

This has been discussed slsa-framework#398

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
hash := sha256.Sum256(data)
log.Printf("computed sha: %s\n", hex.EncodeToString(hash[:]))

cmd := exec.Command("/usr/bin/env", "bash", "-c",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this can be done via printf. Given the discussion in #503 (comment), we may want to use TS instead of Go.

@laurentsimon
Copy link
Collaborator

Closing this PR since it's been agreed it will be written in TS

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

Successfully merging this pull request may close these issues.

None yet

2 participants