Skip to content

Instantly share code, notes, and snippets.

@aliorhun
Created February 17, 2021 08:56
Show Gist options
  • Select an option

  • Save aliorhun/4338a6ae82b529af2982f7337b7aa3a1 to your computer and use it in GitHub Desktop.

Select an option

Save aliorhun/4338a6ae82b529af2982f7337b7aa3a1 to your computer and use it in GitHub Desktop.
sha512 test
package main
import "crypto/sha512"
import "fmt"
func main() {
s := "sha512 test"
h := sha512.New()
h.Write([]byte(s))
bs := h.Sum(nil)
fmt.Println(s)
fmt.Printf("%x\n", bs)
}
@aliorhun
Copy link
Author

alorak@snorlax:~/work$ go run sha512.go

sha512 test
5848d90ec8ede2d27ca25029ec01efc26bce9ecaeb43e2d745d94e89bddec4ef96ef6d25e6cac954c41fda0a557959c2e800bbd2a2e27914f7e58511d39e4b7a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment