package sprig import ( "testing" ) var ( // fastCertKeyAlgos is the list of private key algorithms that are supported for certificate use, and // are fast to generate. fastCertKeyAlgos = []string{ "ecdsa", "ed25519", } ) func TestSha256Sum(t *testing.T) { tpl := `{{"abc" | sha256sum}}` if err := runt(tpl, "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"); err != nil { t.Error(err) } } func TestSha1Sum(t *testing.T) { tpl := `{{"abc" | sha1sum}}` if err := runt(tpl, "a9993e364706816aba3e25717850c26c9cd0d89d"); err != nil { t.Error(err) } } func TestAdler32Sum(t *testing.T) { tpl := `{{"abc" | adler32sum}}` if err := runt(tpl, "38600999"); err != nil { t.Error(err) } }