(t *testing.T)
| 254 | } |
| 255 | |
| 256 | func TestTupleHashXOFNISTSample6(t *testing.T) { |
| 257 | outputLength := 64 |
| 258 | tuples := [][]byte{ |
| 259 | []byte{0x00, 0x01, 0x02}, |
| 260 | []byte{0x10, 0x11, 0x12, 0x13, 0x14, 0x15}, |
| 261 | []byte{0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28}, |
| 262 | } |
| 263 | S := []byte("My Tuple App") |
| 264 | h := TupleHashXOF256(tuples, S) |
| 265 | output := make([]byte, outputLength) |
| 266 | h.Read(output) |
| 267 | expected := strings.Replace("0C 59 B1 14 64 F2 33 6C 34 66 3E D5 1B 2B 95 0B EC 74 36 10 85 6F 36 C2 8D 1D 08 8D 8A 24 46 28 4D D0 98 30 A6 A1 78 DC 75 23 76 19 9F AE 93 5D 86 CF DE E5 91 3D 49 22 DF D3 69 B6 6A 53 C8 97", " ", "", -1) |
| 268 | if got := strings.ToUpper(hex.EncodeToString(output)); got != expected { |
| 269 | t.Errorf("TestTupleHashXOFNISTSample6: got %s, want %s", got, expected) |
| 270 | } |
| 271 | } |
nothing calls this directly
no test coverage detected