github.com/aakash4dev/cometbft@v0.38.2/crypto/example_test.go (about)

     1  package crypto_test
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/aakash4dev/cometbft/crypto"
     7  )
     8  
     9  func ExampleSha256() {
    10  	sum := crypto.Sha256([]byte("This is CometBFT"))
    11  	fmt.Printf("%x\n", sum)
    12  	// Output:
    13  	// ea186526b041852d923b02c91aa04b00c0df258b3d69cb688eaba577f5562758
    14  }