Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for swapEndianness (0.27 sec)

  1. lib/fips140/v1.0.0-c2097c7c.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 Dec 30 11:13:12 UTC 2025
    - Last Modified: Thu Sep 25 19:53:19 UTC 2025
    - 642.7K bytes
    - Viewed (0)
  2. lib/fips140/v1.1.0-rc1.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 Dec 30 11:13:12 UTC 2025
    - Last Modified: Thu Dec 11 16:27:41 UTC 2025
    - 663K bytes
    - Viewed (0)
Back to top