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

Move the base64 & sha256 functions to general.go and change name of sha256 function to hash #1682

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

Borbot33
Copy link
Contributor

No description provided.

@Borbot33 Borbot33 changed the title Move the base64 & sha256 functions to general.go & change name of sha256 function to hash Move the base64 & sha256 functions to general.go and change name of sha256 function to hash Jun 22, 2024
@jo3-l
Copy link
Contributor

jo3-l commented Jun 22, 2024

From my UI, your last commit does not contribute to the overall diff: that is, this PR does not seem to delete the context functions you added. Is that a visual issue on my side, or is it the case for you as well (check the "Files changed" tab?) If the latter, try rebasing on current dev; I suspect your base branch is outdated.

Comment on lines 1706 to 1709
hash := sha256.New()
hash.Write([]byte(str))

sha256 := base64.URLEncoding.EncodeToString(hash.Sum(nil))
Copy link
Contributor

Choose a reason for hiding this comment

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

You may also want to run this change by gofmt: these lines are indented with spaces instead of tabs like the rest of the code.

@ashishjh-bst ashishjh-bst merged commit 6a8d5df into botlabs-gg:dev Jun 27, 2024
1 check passed
ashishjh-bst pushed a commit to ashishjh-bst/yagpdb that referenced this pull request Jun 27, 2024
…ha256 function to hash (botlabs-gg#1682)

* moved functions from context_funcs.go to general.go

* changed function name from sha256 to hash

* moved functions from context_funcs.go to general.go

* added a tab
ashishjh-bst pushed a commit to ashishjh-bst/yagpdb that referenced this pull request Jun 27, 2024
…ha256 function to hash (botlabs-gg#1682)

* moved functions from context_funcs.go to general.go

* changed function name from sha256 to hash

* moved functions from context_funcs.go to general.go

* added a tab
@Borbot33 Borbot33 deleted the base64-and-sha256 branch July 7, 2024 20:14
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.

3 participants