@@ -43,17 +43,38 @@ func TestPolyvalBlocksUpdateAsm(t *testing.T) {
4343 var table polyvalAsmTable
4444 polyvalTableInitAsm (& authKey , & table )
4545
46- expected , _ := hex .DecodeString ("b1aba232dd6c847586593756cb2644eb" )
46+ expected1 , _ := hex .DecodeString ("cc07e4605483f50fd35586290940202c" )
47+ expected2 , _ := hex .DecodeString ("e07a52a82c82073210069f28dd621a5b" )
4748
4849 var y [16 ]byte
4950 var blocks = []byte {
5051 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 ,
5152 0x88 , 0x99 , 0xaa , 0xbb , 0xcc , 0xdd , 0xee , 0xff ,
5253 0xff , 0xee , 0xdd , 0xcc , 0xbb , 0xaa , 0x99 , 0x88 ,
5354 0x77 , 0x66 , 0x55 , 0x44 , 0x33 , 0x22 , 0x11 , 0x00 ,
55+ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,
56+ 0x08 , 0x09 , 0x0a , 0x0b , 0x0c , 0x0d , 0x0e , 0x0f ,
57+ 0x0f , 0x0e , 0x0d , 0x0c , 0x0b , 0x0a , 0x09 , 0x08 ,
58+ 0x07 , 0x06 , 0x05 , 0x04 , 0x03 , 0x02 , 0x01 , 0x00 ,
59+ 0x07 , 0x06 , 0x05 , 0x04 , 0x03 , 0x02 , 0x01 , 0x00 ,
60+ 0x0f , 0x0e , 0x0d , 0x0c , 0x0b , 0x0a , 0x09 , 0x08 ,
61+ 0x08 , 0x09 , 0x0a , 0x0b , 0x0c , 0x0d , 0x0e , 0x0f ,
62+ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,
63+ 0x77 , 0x66 , 0x55 , 0x44 , 0x33 , 0x22 , 0x11 , 0x00 ,
64+ 0xff , 0xee , 0xdd , 0xcc , 0xbb , 0xaa , 0x99 , 0x88 ,
65+ 0x88 , 0x99 , 0xaa , 0xbb , 0xcc , 0xdd , 0xee , 0xff ,
66+ 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 ,
67+ 0x88 , 0x99 , 0xaa , 0xbb , 0xcc , 0xdd , 0xee , 0xff ,
68+ 0xff , 0xee , 0xdd , 0xcc , 0xbb , 0xaa , 0x99 , 0x88 ,
69+ 0x77 , 0x66 , 0x55 , 0x44 , 0x33 , 0x22 , 0x11 , 0x00 ,
70+ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,
71+ }
72+ polyvalBlocksUpdateAsm (& table , & y , blocks )
73+ if ! bytes .Equal (y [:], expected1 ) {
74+ t .Errorf ("unexpected result: got %x, want %x" , y , expected1 )
5475 }
5576 polyvalBlocksUpdateAsm (& table , & y , blocks )
56- if ! bytes .Equal (y [:], expected ) {
57- t .Errorf ("unexpected result: got %x, want %x" , y , expected )
77+ if ! bytes .Equal (y [:], expected2 ) {
78+ t .Errorf ("unexpected result: got %x, want %x" , y , expected2 )
5879 }
5980}
0 commit comments