(t *testing.T)
| 189 | } |
| 190 | |
| 191 | func TestTupleHashXOFNISTSample2(t *testing.T) { |
| 192 | outputLength := 32 |
| 193 | tuples := [][]byte{ |
| 194 | []byte{0x00, 0x01, 0x02}, |
| 195 | []byte{0x10, 0x11, 0x12, 0x13, 0x14, 0x15}, |
| 196 | } |
| 197 | S := []byte("My Tuple App") |
| 198 | h := TupleHashXOF128(tuples, S) |
| 199 | output := make([]byte, outputLength) |
| 200 | h.Read(output) |
| 201 | expected := strings.Replace("3F C8 AD 69 45 31 28 29 28 59 A1 8B 6C 67 D7 AD 85 F0 1B 32 81 5E 22 CE 83 9C 49 EC 37 4E 9B 9A", " ", "", -1) |
| 202 | if got := strings.ToUpper(hex.EncodeToString(output)); got != expected { |
| 203 | t.Errorf("TestTupleHashXOFNISTSample2: got %s, want %s", got, expected) |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | func TestTupleHashXOFNISTSample3(t *testing.T) { |
| 208 | outputLength := 32 |
nothing calls this directly
no test coverage detected