Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

probesha.gno

0.19 Kb · 9 lines
1package probesha
2
3import "crypto/sha256"
4
5// Sum is the smallest possible use of crypto/sha256 in a gno package.
6func Sum(s string) string {
7	h := sha256.Sum256([]byte(s))
8	return string(h[:4])
9}