- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for testShift (0.15 sec)
-
lib/fips140/v1.0.0-c2097c7c.zip
[]uint{1, 32, 64, 128, 1024 - 128, 1024 - 64, 1024 - 32, 1024 - 1} { testShift := func(t *testing.T, shift uint) { n := NewNat().setBig(nb) oldLen := len(n.limbs) n.ShiftRightVarTime(shift) if len(n.limbs) != oldLen { t.Errorf("len(n.limbs) = %d, want %d", len(n.limbs), oldLen) } exp := new(big.Int).Rsh(nb, shift) if n.asBig().Cmp(exp) != 0 { t.Errorf("%v != %v", n.asBig(), exp) } } t.Run(fmt.Sprint(shift-1), func(t *testing.T) { testShift(t, shift-1) }) t.Run(fmt.Sprint(shift), func(t *testing.T) { testShift(t,...Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Thu Sep 25 19:53:19 UTC 2025 - 642.7K bytes - Viewed (0) -
lib/fips140/v1.1.0-rc1.zip
[]uint{1, 32, 64, 128, 1024 - 128, 1024 - 64, 1024 - 32, 1024 - 1} { testShift := func(t *testing.T, shift uint) { n := NewNat().setBig(nb) oldLen := len(n.limbs) n.ShiftRightVarTime(shift) if len(n.limbs) != oldLen { t.Errorf("len(n.limbs) = %d, want %d", len(n.limbs), oldLen) } exp := new(big.Int).Rsh(nb, shift) if n.asBig().Cmp(exp) != 0 { t.Errorf("%v != %v", n.asBig(), exp) } } t.Run(fmt.Sprint(shift-1), func(t *testing.T) { testShift(t, shift-1) }) t.Run(fmt.Sprint(shift), func(t *testing.T) { testShift(t,...Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Thu Dec 11 16:27:41 UTC 2025 - 663K bytes - Viewed (0)