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

add openssl hmac #655

Merged
merged 2 commits into from
Aug 5, 2024
Merged

add openssl hmac #655

merged 2 commits into from
Aug 5, 2024

Conversation

tsingbx
Copy link
Contributor

@tsingbx tsingbx commented Aug 5, 2024

No description provided.

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.57%. Comparing base (4bff9cc) to head (2ccfa6a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #655   +/-   ##
=======================================
  Coverage   97.57%   97.57%           
=======================================
  Files          19       19           
  Lines        4581     4581           
=======================================
  Hits         4470     4470           
  Misses         94       94           
  Partials       17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

delete GetMD and HMAC function

delete macro

tidy code

add hmac
@tsingbx tsingbx changed the title add hmac add openssl hmac Aug 5, 2024
Unused [0]byte
}

type EVP_MD_CTX struct {
Copy link
Member

Choose a reason for hiding this comment

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

这个没有用到

//go:linkname EVP_sha512 C.EVP_sha512
func EVP_sha512() *EVP_MD

type EVP_MD struct {
Copy link
Member

Choose a reason for hiding this comment

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

这个类放到它的所有实例创建函数前更好。

c.Fprintf(c.Stderr, c.Str("%s\n"), c.Str("Error finalizing HMAC_CTX"))
return
}
fmt.Print("HMAC: ")
Copy link
Member

Choose a reason for hiding this comment

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

fmt.Printf("%x\n", digest[:digestLen]) 就行

@xushiwei xushiwei merged commit d7b203a into goplus:main Aug 5, 2024
5 checks passed
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.

2 participants