MCPcopy Create free account
hub / github.com/daodst/chat / TestEncode1

Function TestEncode1

new_feature/key_func_test.go:25–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23 }
24}
25func TestEncode1(t *testing.T) {
26 encoded, err := base64.StdEncoding.DecodeString(`BJXNxUOpfr7vQ+jWsmF8UAd9ufvNAkm+wLbrjj/D8udhncXqFZkx8i/UBc2KWJV1TzpQmqCqlhba
27r+nWKaJFqCSdM/8mzxSkUdB4tJeOmX0g7WjSvS+fnsoVzxYLVhO1ZCH8sGD3Dk6QpwtP3y0rya+R
28EA==
29`)
30 priKey := "0SEeDatf+3jkR3pR7MldjpnfYWbPsKzKMdWLRt7xG+A="
31 //priBytes, _ := base64.StdEncoding.DecodeString(priKey)
32 decoded, err := Decode(priKey, encoded)
33 if err != nil {
34 t.Error(err.Error())
35 } else {
36 t.Log(string(decoded))
37 }
38}

Callers

nothing calls this directly

Calls 2

DecodeFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected