Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cmd/gf/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ require (
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.9.6
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.9.6
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.9.6
github.com/gogf/gf/contrib/drivers/tidb/v2 v2.9.6
github.com/gogf/gf/contrib/drivers/oceanbase/v2 v2.9.6
github.com/gogf/gf/contrib/drivers/gaussdb/v2 v2.9.6
github.com/gogf/gf/contrib/drivers/mariadb/v2 v2.9.6
github.com/gogf/gf/v2 v2.9.6
github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f
github.com/olekukonko/tablewriter v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions crypto/gsha256/gsha256.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import (
"github.com/gogf/gf/v2/util/gconv"
)

// Encrypt encrypts any type of variable using sha256 algorithms.
// Encrypt encrypts any type of variable using SHA256 algorithms.
// It uses package gconv to convert `v` to its bytes type.
func Encrypt(v any) string {
bs := sha256.Sum256(gconv.Bytes(v))
return hex.EncodeToString(bs[:])
}

// EncryptFile encrypts file content of `path` using sha256 algorithms.
// EncryptFile encrypts file content of `path` using SHA256 algorithms.
func EncryptFile(path string) (encrypt string, err error) {
f, err := os.Open(path)
if err != nil {
Expand Down