library (todo): crypto/hmac, internal/fmtsort

This commit is contained in:
xushiwei
2024-08-06 17:03:22 +08:00
parent 6a05aa4e53
commit a2b5b9f97e
4 changed files with 245 additions and 245 deletions

View File

@@ -1,7 +1,15 @@
package main
import "crypto/hmac"
import (
"crypto/hmac"
"crypto/sha1"
"fmt"
"io"
)
func main() {
hmac.New(nil, []byte{'1', '2'})
h := hmac.New(sha1.New, []byte("<key>"))
io.WriteString(h, "The fog is getting thicker!")
io.WriteString(h, "And Leon's getting laaarger!")
fmt.Printf("%x", h.Sum(nil))
}