(t *testing.T)
| 205 | } |
| 206 | |
| 207 | func TestTupleHashXOFNISTSample3(t *testing.T) { |
| 208 | outputLength := 32 |
| 209 | tuples := [][]byte{ |
| 210 | []byte{0x00, 0x01, 0x02}, |
| 211 | []byte{0x10, 0x11, 0x12, 0x13, 0x14, 0x15}, |
| 212 | []byte{0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28}, |
| 213 | } |
| 214 | S := []byte("My Tuple App") |
| 215 | h := TupleHashXOF128(tuples, S) |
| 216 | output := make([]byte, outputLength) |
| 217 | h.Read(output) |
| 218 | expected := strings.Replace("90 0F E1 6C AD 09 8D 28 E7 4D 63 2E D8 52 F9 9D AA B7 F7 DF 4D 99 E7 75 65 78 85 B4 BF 76 D6 F8", " ", "", -1) |
| 219 | if got := strings.ToUpper(hex.EncodeToString(output)); got != expected { |
| 220 | t.Errorf("TestTupleHashXOFNISTSample3: got %s, want %s", got, expected) |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | func TestTupleHashXOFNISTSample4(t *testing.T) { |
| 225 | outputLength := 64 |
nothing calls this directly
no test coverage detected