You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
151 B

  1. package crypto
  2. import (
  3. "crypto/sha256"
  4. )
  5. func Sha256(bytes []byte) []byte {
  6. hasher := sha256.New()
  7. hasher.Write(bytes)
  8. return hasher.Sum(nil)
  9. }