Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for swapEndianness (0.41 sec)

  1. lib/fips140/v1.0.0.zip

    fe.Equal(&tt.fe) != 1 { t.Errorf("Failed fixed roundtrip: %v", tt) } } } func swapEndianness(buf []byte) []byte { for i := 0; i < len(buf)/2; i++ { buf[i], buf[len(buf)-i-1] = buf[len(buf)-i-1], buf[i] } return buf } func TestBytesBigEquivale(t *testing.T) { f1 := func(in [32]byte, fe, fe1 Element) bool { fe.SetBytes(in[:]) in[len(in)-1] &= (1 << 7) - 1 // mask the most significant bit b := new(big.Int).SetBytes(swapEndianness(in[:])) fe1.fromBig(b) if fe != fe1 { return false } buf := make([]byte, 32)...
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed Jan 29 15:10:35 UTC 2025
    - 635K bytes
    - Viewed (0)
Back to top