secp256k1FeSetB32Mod static method

void secp256k1FeSetB32Mod(
  1. Secp256k1Fe r,
  2. List<int> a
)

Implementation

static void secp256k1FeSetB32Mod(Secp256k1Fe r, List<int> a) {
  a.asMin32("secp256k1FeSetB32Mod");
  r[0] = a[31].toUnsignedBigInt64 |
      (a[30].toUnsignedBigInt64 << 8) |
      (a[29].toUnsignedBigInt64 << 16) |
      (a[28].toUnsignedBigInt64 << 24) |
      (a[27].toUnsignedBigInt64 << 32) |
      (a[26].toUnsignedBigInt64 << 40) |
      ((a[25] & 0xF).toUnsignedBigInt64 << 48);
  r[1] = ((a[25] >> 4) & 0xF).toUnsignedBigInt64 |
      (a[24].toUnsignedBigInt64 << 4) |
      (a[23].toUnsignedBigInt64 << 12) |
      (a[22].toUnsignedBigInt64 << 20) |
      (a[21].toUnsignedBigInt64 << 28) |
      (a[20].toUnsignedBigInt64 << 36) |
      (a[19].toUnsignedBigInt64 << 44);
  r[2] = a[18].toUnsignedBigInt64 |
      (a[17].toUnsignedBigInt64 << 8) |
      (a[16].toUnsignedBigInt64 << 16) |
      (a[15].toUnsignedBigInt64 << 24) |
      (a[14].toUnsignedBigInt64 << 32) |
      (a[13].toUnsignedBigInt64 << 40) |
      ((a[12] & 0xF).toUnsignedBigInt64 << 48);
  r[3] = ((a[12] >> 4) & 0xF).toUnsignedBigInt64 |
      (a[11].toUnsignedBigInt64 << 4) |
      (a[10].toUnsignedBigInt64 << 12) |
      (a[9].toUnsignedBigInt64 << 20) |
      (a[8].toUnsignedBigInt64 << 28) |
      (a[7].toUnsignedBigInt64 << 36) |
      (a[6].toUnsignedBigInt64 << 44);
  r[4] = a[5].toUnsignedBigInt64 |
      (a[4].toUnsignedBigInt64 << 8) |
      (a[3].toUnsignedBigInt64 << 16) |
      (a[2].toUnsignedBigInt64 << 24) |
      (a[1].toUnsignedBigInt64 << 32) |
      (a[0].toUnsignedBigInt64 << 40);
}