(t *testing.T)
| 238 | } |
| 239 | |
| 240 | func TestTupleHashXOFNISTSample5(t *testing.T) { |
| 241 | outputLength := 64 |
| 242 | tuples := [][]byte{ |
| 243 | []byte{0x00, 0x01, 0x02}, |
| 244 | []byte{0x10, 0x11, 0x12, 0x13, 0x14, 0x15}, |
| 245 | } |
| 246 | S := []byte("My Tuple App") |
| 247 | h := TupleHashXOF256(tuples, S) |
| 248 | output := make([]byte, outputLength) |
| 249 | h.Read(output) |
| 250 | expected := strings.Replace("64 83 CB 3C 99 52 EB 20 E8 30 AF 47 85 85 1F C5 97 EE 3B F9 3B B7 60 2C 0E F6 A6 5D 74 1A EC A7 E6 3C 3B 12 89 81 AA 05 C6 D2 74 38 C7 9D 27 54 BB 1B 71 91 F1 25 D6 62 0F CA 12 CE 65 8B 24 42", " ", "", -1) |
| 251 | if got := strings.ToUpper(hex.EncodeToString(output)); got != expected { |
| 252 | t.Errorf("TestTupleHashXOFNISTSample5: got %s, want %s", got, expected) |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | func TestTupleHashXOFNISTSample6(t *testing.T) { |
| 257 | outputLength := 64 |
nothing calls this directly
no test coverage detected