This commit is contained in:
2024-05-03 00:05:14 +05:30
parent a415d888f1
commit 8d8b00ba83
2 changed files with 17 additions and 2 deletions

13
sha/sha.go Normal file
View File

@@ -0,0 +1,13 @@
package sha
import (
"crypto/sha256"
"fmt"
)
func Sha() {
h := sha256.New()
h.Write([]byte("hello world!"))
fmt.Printf("SHA256 hash of 'hello world!': %x\n", h.Sum(nil))
}